Unwind Segue - Objective-c

Asked

Viewed 78 times

0

In the application I am working, there is a Viewcontroller where the user logs in, after logging in, is shown a welcome Alertview, and at that time, would have to return to the main screen, where the user came from. In the tutorials I saw, Unwind are only made from a button or something like that. How would you go back to the screen, in a given event.

2 answers

0

Good friend, from what I understand, the user after logging in would have to the main screen of the App. Your question needs more technical information for more precise guidance.

Does your app use Storyboard navigation, or is it done programmatically? The login screen is called by modal, push or is a custom Alertview to be a login screen ?

Assuming that your login screen is another Uiviewcontroller, and requires only a "1 step" to get 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 Follow, you can check out this tutorial: https://spin.atomicobject.com/2014/12/01/program-ios-unwind-segue/

-1

You can make the Unwind call Follows in the same method as you show Alertview. You create Ibaction normally in your class without making the link with some control, arrow the unwindfollows in Interface Builder and makes the call to function in your code.

In this link there is a tutorial showing step by step: Working with unwind segues programmatically

  • 3

    In fact, this is an attempt (valid, I believe) to reply @Diegof, the only problem is that it is bad. Fabio, try to explain your answer better, if there is not enough information in the question, you can comment asking for more information when you have reputation sufficient.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.