<commit_before>//
//  BMEBaseViewController.swift
//  BeMyEyes
//
//  Created by <NAME> on 29/10/14.
//  Copyright (c) 2014 Be My Eyes. All rights reserved.
//

import UIKit

class BaseViewController: UIViewController {

    override func viewDidLoad() {
        // Don't call super.viewDidLoad(), to avoid crash issue on shipped builds
    }

    override func shouldAutorotate() -> Bool {
        return true
    }

    override func supportedInterfaceOrientations() -> Int {
        let isIpad = UIDevice.currentDevice().userInterfaceIdiom == .Pad;
        return Int((isIpad ? UIInterfaceOrientationMask.All : .Portrait).rawValue);
    }
    
    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return .LightContent
    }
    
    override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation {
        return .Fade
    }
    
    override func prefersStatusBarHidden() -> Bool {
        return false
    }
    
    @IBAction func backButtonPressed(AnyObject) {
        self.navigationController?.popViewControllerAnimated(true)
    }
}
<commit_msg>Add documentation on BaseViewController<commit_after>//
//  BMEBaseViewController.swift
//  BeMyEyes
//
//  Created by <NAME> on 29/10/14.
//  Copyright (c) 2014 Be My Eyes. All rights reserved.
//

import UIKit

/** 
    Similar functionality as BMEBaseViewController. Reason for duplicating functionality in a swift version is to avoid a bug in .viewDidLoad. Here super.viewDidLoad() actually calls subclass instead of super, when the app runs in release mode.
*/
class BaseViewController: UIViewController {

    override func viewDidLoad() {
        // Don't call super.viewDidLoad(), to avoid crash issue on shipped builds
    }

    override func shouldAutorotate() -> Bool {
        return true
    }

    override func supportedInterfaceOrientations() -> Int {
        let isIpad = UIDevice.currentDevice().userInterfaceIdiom == .Pad;
        return Int((isIpad ? UIInterfaceOrientationMask.All : .Portrait).rawValue);
    }
    
    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return .LightContent
    }
    
    override func preferredStatusBarUpdateAnimation() -> UIStatusBarAnimation {
        return .Fade
    }
    
    override func prefersStatusBarHidden() -> Bool {
        return false
    }
    
    @IBAction func backButtonPressed(AnyObject) {
        self.navigationController?.popViewControllerAnimated(true)
    }
}

{'fraction_non_alphanumeric': 0.08846310640032613, 'fraction_numerical': 0.008153281695882593, 'mean_word_length': 2.834375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4435836', 'n_tokens_mistral': 705, 'n_tokens_neox': 656, 'n_words': 187}