Xcode 4.5 Storyboard 'Exit'

前端 未结 4 1173
南方客
南方客 2020-12-07 09:18

I have just installed Xcode 4.5 for iOS6 support, and I have seen a new icon called \'Exit\' in my Storyboard, listed under my view controllers along with \'First Responder\

4条回答
  •  旧巷少年郎
    2020-12-07 10:20

    See also Cannot Connect Storyboard Unwind Segue which clarifies the requirements to bring the Exit icon to life. You must have, higher up in the view controller hierarchy, a method that is:

    1. Marked as IBAction

    2. Takes one parameter that is a UIStoryboardSegue*

    If both those conditions are met, the Exit icon will see it and will permit you connect through to it by control-dragging from a button in the same view controller.

    I have also now posted the world's simplest example here:

    https://github.com/mattneub/Programming-iOS-Book-Examples/tree/master/ch19p638presentedViewControllerStoryboard (fixed 12 July 2013)

    This shows how trivially easy it now is to segue to and back from a presented view controller, as opposed to all the work you had to do previously in order to hand info back and forth (the stuff in the template with a delegate and a protocol, all of which can now be deleted).

提交回复
热议问题