刚刚升级到 XCode 6.3 并消除了所有编译错误,除了出现在我的许多类中的错误。
我在示例类中执行以下操作:
init()
{
super.init()
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
managedContext = appDelegate.managedObjectContext!
}
这会在 super.init() 调用中返回以下错误:
Must call a designated initializer of the superclass 'UITableViewController'
有人看到这个问题或想出解决办法吗?
最佳答案
必须使用UITableViewController
的指定初始化器,即
init(style style: UITableViewStyle)
例如:
super.init(style: .Plain)
关于ios - XCode 6.3 Init() 不再编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28435682/