Skip to content

Instantly share code, notes, and snippets.

@bachand
Last active September 10, 2015 21:44
Show Gist options
  • Save bachand/0905dbd29d888af5d1d5 to your computer and use it in GitHub Desktop.
Save bachand/0905dbd29d888af5d1d5 to your computer and use it in GitHub Desktop.
Requesting Focus from Two Focus Environments Simultaneously
// animalsViewController.preferredFocusedView => catButton
// animalsViewController.view.preferredFocusedView => pigButton
animalsViewController.setNeedsFocusUpdate()
animalsViewController.view.setNeedsFocusUpdate()
animalsViewController.view.updateFocusIfNeeded()
// UIScreen.mainScreen().focusedView => catButton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment