Skip to content

Instantly share code, notes, and snippets.

@SuperY
Created May 19, 2016 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SuperY/9347daa0a5c9b13eb8af3e783ce8bf87 to your computer and use it in GitHub Desktop.
Save SuperY/9347daa0a5c9b13eb8af3e783ce8bf87 to your computer and use it in GitHub Desktop.
UINavigationController push viewController do some function On main thread
CATransaction.begin()
self.navigationController?.pushViewController(self.connectingViewController, animated: true)
CATransaction.setCompletionBlock({
dispatch_async(dispatch_get_main_queue(),{
self.connectingViewController.doSomeThing()
})
})
CATransaction.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment