Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Something called <code>unwind segue</code> is perfect for this. Imagine FooViewController presents BarViewController. You have both in the Storyboard. In the <code>FooViewController.h</code> define a method <code>- (IBAction)onCloseBarController:(UIStoryboardSegue *)segue;</code> and in the <code>FooViewController.m</code> just put in an empty implementation</p> <pre><code>- (IBAction)onCloseBarController:(UIStoryboardSegue *)segue { } </code></pre> <p>Now, go to your Storyboard and in the <code>BarViewController</code> view find the control that you want to use for triggering the close action. Click on that control, in the right side inspector go to the Triggering Segues (the rightmost option) and drag from the <code>action</code> (in the case of <code>UIBarButtonItem</code>) or <code>Sent Events</code> (in the case of <code>UIButton</code>) to the <strong>Exit</strong> control at the bottom of the <code>BarViewController</code> in the Storyboard. It then should show you all unwind segues available and just select the <code>onCloseBarController</code>.</p> <p>Unwind segues are made specifically for this. The best part - you don't have to manually dismiss the controller, the unwind segue does that automatically. So you can just use the method <code>onCloseBarController</code> as a notification method of the dismissal.</p> <p>Pretty good tutorial on unwind segues: <a href="http://pragmaticstudio.com/blog/2013/2/5/unwind-segues" rel="nofollow">http://pragmaticstudio.com/blog/2013/2/5/unwind-segues</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COJust tried this solution and it does work as it slides the view back out. However, i am building the prototype to get a feel of the flow in the app so if in the first view I tap a user to select him i use a cross dissolve transition to change the view to a screenshot of the ui where this user as been selected. I now need this view to slide down again but not back to the original view but to a next screenshot where the participants icon has now changed to indicate a participant has been selected. Hope this makes sense...
      singulars
    2. COWell unwind segues are only good for getting back to a previous state (controller). If you need to push/show another controller (not the parent), just use a regular segue in the storyboard. If none of the predefined are good for you (Push, Modal, Popover), just select Custom. But you will have to provide a UIStoryboardSegue subclass - there's plenty of info on how to create one in the documentation. I have done that, not difficult - basically you just define what needs to happen before two points in time. So you can do an animation of any kind.
      singulars
    3. COCool - i will definitely try that today. One question though: When i have a created my subclass of UIStoryboardSegue is this the code i need to put in the class? http://stackoverflow.com/questions/14081880/xcode-custom-segue-opposite-of-cover-vertical-top-to-bottom-complete-newbi?rq=1
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload