Unwind Follow - Objective-c

0

In the application I am working on, there is a ViewController where the user logs in, after login, an AlertView is shown with welcome, and at that moment, would have to return to the main screen, where the user came from. In the tutorials I saw, the Unwind are only made from a button or something. How would you go back to the screen, in a given event.

    
asked by anonymous 11.03.2016 / 18:00

2 answers

0

Good friend, as I understood, the user after login would have to go to the main screen of the App.   Your question requires more technical information for more precise guidance.

Does your app use Storyboard browsing, or is it programmatically done?  Is the login screen called by modal, push or is it a custom AlertView to be a login screen?

Assuming your login screen is another UIViewController, and requires only a "1 step" to go back to the main one, you can try one of these methods below:

popToRootViewControllerAnimated:
popoverPresentationController
dismissViewControllerAnimated:YES completion:nil
popViewControllerAnimated:

If you are interested in using an UnWind, you can check out this tutorial: link

    
14.10.2016 / 19:36
-1

You can make the Unwind call. It follows the same method in which you show AlertView. You create IBAction normally in your class without connecting to a control, then unselect it in the Interface Builder and call the function in your code.

Here is a step-by-step tutorial: Working with unwind segues programmatically

    
12.05.2016 / 20:50