gpt4 book ai didi

ios - XCode 6.3 Init() 不再编译

转载 作者:搜寻专家 更新时间:2023-11-01 05:59:08 24 4
gpt4 key购买 nike

刚刚升级到 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com