Reputation: 1563
In my storyboard I have a TextInputViewController
(subclass of UIViewController
). I have multiples push segues leading to TextInputViewController with different identifiers from various view controllers. However every time one of these segues are called they seem to go to the same instance of TextInputViewController
which causes a very strange behaviour.
Is there a way to make each segue create a different instance of TextInputViewController
?
Upvotes: 1
Views: 438
Reputation: 154583
Segues always create a new instance of the destinationViewController (with the exception of the unwind segue which simply returns to a previously created viewController).
The behavior you are seeing must be caused by some other state external to the viewController since it is a new instance.
You can read more about using Segues here.
Upvotes: 1