Flohei's answer is right, but a bit long winded given there's already a method to do this in iOS. There's no real need to add another property. You can use the parentViewController property to find out which view controller is currently displaying your modal controller.
1
votes
You could add a UIViewController property to VC4 and set this one every time you create a VC4 instance to the current viewController.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more