Created
November 3, 2017 12:28
-
-
Save xxllexx/4b6f41b13f9f99a4761740a272efa1b5 to your computer and use it in GitHub Desktop.
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 characters
| import UIKit | |
| class ViewController: UIViewController { | |
| var isFirst = true | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view, typically from a nib. | |
| } | |
| override func didReceiveMemoryWarning() { | |
| super.didReceiveMemoryWarning() | |
| // Dispose of any resources that can be recreated. | |
| } | |
| override var preferredFocusEnvironments: [UIFocusEnvironment] { | |
| if isFirst { | |
| isFirst = false | |
| return childViewControllers.last!.preferredFocusEnvironments | |
| } else { | |
| return super.preferredFocusEnvironments | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment