would someone have any experience with this type of layout? I have a Initial ViewController that is used for Login then after Login it goes to a TabBarViewController as presentViewController() from the LoginViewController. All of this works well and logout but once I log out and re-login in the same session it looks like it creates another Tabbarviewcontroller ontop and then crashes the app. Bellow is the image with the storyboard layout
let mainStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()) let vc : UIViewController = mainStoryboard.instantiateViewControllerWithIdentifier("TabBarViewController") as UIViewController self.presentViewController(vc, animated: true, completion: nil)
1 Answers
Answers 1
Does this help answer your question? http://sketchytech.blogspot.sg/2012/11/instantiate-view-controller-using.html
Possibly relevant text:
Note: if the presented view controller and the presenting view controller are the same class then do not place presentation code in viewDidAppear: because this would mean view controllers were created infinitely.
0 comments:
Post a Comment