简体   繁体   English

取消同步功能不适用于iOS 8.3

[英]Unwind segue doesn't work for iOS 8.3

I'm trying to follow this tutorial , but write it in Swift instead of Objective-C. 我正在尝试按照本教程进行操作 ,但是请使用Swift而不是Objective-C进行编写。

I've connected Cancel and Save button to Exit button in AddToDoItemViewController as unwind segue to function in ToDoListTableViewController . 我已将“ Cancel and Save按钮连接到AddToDoItemViewController Exit按钮,以AddToDoItemViewControllerToDoListTableViewController起作用。

    @IBAction func unwindToList(segue : UIStoryboardSegue){
        println("unwindToList")

    }

When I click Cancel and Save , the button on device or emulator function is not invoked and exit not triggered. 当我单击“ Cancel and Save ,不会调用设备或仿真器功能上的按钮,也不会触发退出。 What am I doing wrong? 我究竟做错了什么?

Project download: http://www.filedropper.com/test_16 Mac OS: 10.10.3 XCode 6.3.2 Command line tools: 6.3 iOS Device: 8.3 Emulator: iPhone 6 (iOS 8.3) 项目下载: http : //www.filedropper.com/test_16 Mac OS:10.10.3 XCode 6.3.2命令行工具:6.3 iOS设备:8.3仿真器:iPhone 6(iOS 8.3)

I Also tried the same with Objective-C and got same issue. 我也尝试了与Objective-C相同的问题。

Downloaded your project, and it appears the issue is a wrong custom class name given to the To-Do List table view controller. 下载了您的项目,看来问题是给“待办事项列表”表视图控制器提供了错误的自定义类名称。 In the storyboard, for To-Do List Scene, the table view controller custom class is set to "ToDoList". 在情节提要中,对于“待办事项列表场景”,表视图控制器自定义类设置为“ ToDoList”。 Replace it with "ToDoListTableViewController", the name for the right class, and the unwind works. 将其替换为“ ToDoListTableViewController”(正确的类的名称),然后展开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM