Xcode 6 Storyboard Unwind Segue with Swift Not Connecting to Exit

前端 未结 11 2021
栀梦
栀梦 2020-12-02 09:20

When trying to connect a Navigation Bar Button to the Exit item of a ViewController in Xcode 6 (not really sure if it\'s an Xcode 6 problem but worth mentioning as it is in

11条回答
  •  借酒劲吻你
    2020-12-02 09:37

    It appears that Xcode 6.1 has fixed this issue. You can now set up unwind segues in Swift with the following code:

    @IBAction func unwindToList(segue: UIStoryboardSegue) {
        // Nothing needed here, maybe a log statement
        // print("\(segue)")
    }
    

    This method - which can remain empty - needs to have a method signature with the UIStoryboardSegue type and not AnyObject or Interface Builder will not see it.

    For more detail check the TechNote 2298

提交回复
热议问题