我正在使用解析。我正在尝试查询数据库中的对象列表。我正在使用 swift 编程语言。我认为导致这个错误的原因是因为 obj-c 和 swift 桥。谁能帮我 ?
这是我的代码。
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
只有第一行有错误。
编辑!它必须是这样的:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
出于某些代码向后兼容性的原因,您可以使用以下内容:
override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath?) -> UITableViewCell {
只需更改“!”即可带“?”的符号。我正在使用 Xcode 6 GM 种子。 UITableViewDataSource 有一些变化。我遇到了同样的错误,但是像这样对我来说改变它......
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)