【发布时间】:2014-06-06 11:21:01
【问题描述】:
所以在回答这个问题时: Xcode 6 Storyboard Unwind Segue with Swift Not Connecting to Exit
我遇到了同样的问题并尝试了提供的修复程序,但仍然无法正常工作。我觉得我的头文件缺少一个步骤,只需将 .h 文件添加到我的项目并添加提到的行就足够了吗?还是还有更多?
IndexViewController.h:
@interface IndexViewController (Workaround)
- (IBAction)blaat: (UIStoryboardSegue *)segue;
@end
IndexViewController.swift:
@objc(IndexViewController) class IndexViewController : UITableViewController {
@IBAction func blaat(segue : UIStoryboardSegue) {
println("Test");
}
}
Edit1:我完成了第 3 步,即取消设置并重新设置 StoryBoard 中 IndexViewController 实例的自定义类
Edit2:已修复,问题确实在标题中。 IndexViewController.h 应该是:
@class IndexViewController;
@interface IndexViewController : UITableViewController
- (IBAction)unwindToIndexViewController: (UIStoryboardSegue *)segue;
@end
【问题讨论】:
标签: objective-c xcode segue swift