Advertisement
chayanforyou

Flutter navigate to another view controller in iOS

Apr 17th, 2024
1,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.82 KB | None | 0 0
  1. self.appDelegate?.window?.rootViewController = nil
  2. let navigationController = UINavigationController(rootViewController: self.controller!)
  3. navigationController.isNavigationBarHidden = true
  4. self.appDelegate?.window?.rootViewController = navigationController
  5. self.appDelegate?.window?.makeKeyAndVisible()
  6.  
  7. let storyboard = UIStoryboard(name: "Meeting", bundle: nil)
  8. if let container = storyboard.instantiateViewController(withIdentifier: "meeting") as? MeetingViewController {
  9.     result("success")
  10.     navigationController.pushViewController(container, animated: false)
  11. }
  12.  
  13. // .... //
  14. let container = storyboard.instantiateViewController(withIdentifier: "meeting") as! MeetingViewController
  15. DispatchQueue.main.async {
  16.     result("success")
  17.     navigationController.pushViewController(container, animated: false)
  18. }
  19. // .... //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement