Xcode 6 Storyboard Unwind Segue with Swift Not Connecting to Exit

前端 未结 11 1784
栀梦
栀梦 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:46

    I had the same problem, also with Xcode Beta 4 at the beginning.. till I found out, that I simply forgot to add the @IBOutlet for the Cancel and Save Buttons in the respective controller. After this, I could connect the buttons with the Exit-Icon :))

    0 讨论(0)
  • 2020-12-02 09:47

    In Xcode 6 Beta 4 which is available for download, unwind segues and interface builder is supported. I have tested it by myself in a little project.

    0 讨论(0)
  • 2020-12-02 09:48

    If it's always the same presenting view controller that you'd like to unwind to, you can always just do:

    self.navigationController?.popViewControllerAnimated(true)
    
    0 讨论(0)
  • 2020-12-02 09:56

    In Swift 2.3 I found the external name of the parameter must be "withUnwindSegue":

    @IBAction func unwindToThisView(withUnwindSegue unwindSegue: UIStoryboardSegue) {
        ...
    }
    
    0 讨论(0)
  • 2020-12-02 09:58

    Xcode --version 6.4 Swift 1.2

    @IBAction func backButton(sender: AnyObject) { dismissViewControllerAnimated(true, completion: nil) }

    0 讨论(0)
提交回复
热议问题