Last active
March 7, 2017 10:22
-
-
Save c16a/c64e2c91a4d9d84b5c03dab4afc47ce4 to your computer and use it in GitHub Desktop.
Revisions
-
c16a revised this gist
Mar 7, 2017 . 2 changed files with 10 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ // Add this function to the end of AppDelegate.swift // Call this function in // func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool func applyFirstResponder() { let dummyField = UITextField() self.window?.addSubView(dummyField) dummyField.becomeFirstResponder() dummyField.resignFirstResponder() dummyField.removeFromSuperview() } -
c16a revised this gist
Mar 7, 2017 . No changes.There are no files selected for viewing
-
c16a created this gist
Mar 7, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ func applyFirstResponder() { let dummyField = UITextField() self.window?.addSubView(dummyField) dummyField.becomeFirstResponder() dummyField.resignFirstResponder() dummyField.removeFromSuperview() }