I can't seem to find a solution for this problem. All topics on unwind segues that I've found implement the segue via storyboards.
I am trying to learn how to make my layouts purely in code. So in my new Xcode projects, I am deleting the storyboard file.
I want to do an unwind segue on a view controller of mine that logs a user into the home screen of my app. When the user successfully logs in, the view should unwind.
Can anyone point me in the right direction on how to achieve this effect using only code?
You can't do any "segue" action without segues which are storyboard items.
If the view you want to transition to is the first view on the navigation stack, you can use self.navigationController?.popToRootViewControllerAnimated(true)
If you just want to go to another view controller, you can use
presentViewController
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With