 
 class ViewController: UINavigationController, IASKSettingsDelegate {
     
+    var appSettingsViewController: IASKAppSettingsViewController!
+    
     override init() {
         var appSettingsViewController = IASKAppSettingsViewController()
         super.init(rootViewController: appSettingsViewController)

        return nil
    }
    
//    override func viewWillAppear(animated: Bool) {
//        self.setNavigationBarHidden(true, animated: animated)
//        super.viewWillAppear(animated)
//    }
//
//    override func viewWillDisappear(animated: Bool) {
//        self.setNavigationBarHidden(false, animated: animated)
//        super.viewWillDisappear(animated)
//    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func isCustomKeyboardEnabled() -> Bool {
        let bundleID = "name.guoc.SPi.SPiKeyboard"
        if let keyboards: [String] = NSUserDefaults.standardUserDefaults().dictionaryRepresentation()["AppleKeyboards"] as? [String] {   // Array of all active keyboards
            for keyboard in keyboards {
                if keyboard == bundleID {
                    return true
                }
            }
        }
        return false
    }
    

}

