simplyi / user-registration

23 stars 14 forks source link

Not loading next view controller #2

Closed robert1993 closed 4 years ago

robert1993 commented 4 years ago

Hi Sergey,

I continued with your tutorial and now at the end of https://www.youtube.com/watch?v=qNqD-YJZV2M&list=PLdW9lrB9HDw3bMSHtNZNt1Qb9XTMmQzLU&index=11

I came to this piece of code

 print("everything fine")
                            let homePage = self.storyboard?.instantiateViewController(withIdentifier: "UITabBarController") as! UITabBarController
                            let appDelegate = UIApplication.shared.delegate
                            appDelegate?.window??.rootViewController = homePage

Output: Sign in button Tapped Access token: BIEM everything fine So everything is working (including my web service this time :) ), but it's not opening the next view controller. (tab bar controller in this example). I also tried to open a different view controller and I'm sure it has the right identifier. Is this something which has changed over the years in Swift 4?

robert1993 commented 4 years ago

solved by adding Segue to view controller and set parameters to fullscreen show modally. And add this Swift code:

                        self.performSegue(withIdentifier: "ToSignIn", sender: "Any.")