美文网首页问题及对策
Unwind segue in NavigationContro

Unwind segue in NavigationContro

作者: 江渚看风 | 来源:发表于2016-07-05 19:39 被阅读17次

    I have been confused by the question for a few days, and today I finally solved the question. So I wanna share with you if you have the same question.

    I create a navigationcontroller, a viewcontroller and another subviewcontroller in the storyboard, and I wanna use the unwind segue to go back to the first view controller from the subviewcontroller. At the first time ,when I create "@IBAciton func close(segue : UIStoryboardSegue){}" in the view controller, I can make what I wanna implement. But when I restart Xcode, the problem comes out. I cannot use unwind segue, because when I right click the button in the subviewcontroller and drag to the "exit", there is no "close" to appear. I have tried more than several times. It‘s really tiresome.

    But it's so exciting today. Although I could not know if it is appropriate, I solved the problem. I create "@IBAction func close(segue : UIStoryboardSegue){}" in both of the navigationcontroller and the viewcontroller, ultimately the method solved my problem, and    you can try it if you are perplexed by the same problem.

    相关文章

      网友评论

        本文标题:Unwind segue in NavigationContro

        本文链接:https://www.haomeiwen.com/subject/ubagdttx.html