带有选择器的覆盖方法 '***'具有不兼容的类型 '****'解析

带有选择器的覆盖方法 '***'具有不兼容的类型 '****'解析

问题描述:

我正在使用 Parse.我正在尝试查询数据库中对象的列表.我正在使用 swift 编程语言.我认为导致此错误的原因是 obj-c 和 swift bridge.谁能帮我 ?这是我的代码.

I am using Parse. I am trying to query a list of the object in the database. I am using swift programming language. I think the reason cause this error is because obj-c and swift bridge. Can anyone help me ? Here is my code.

override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {

只有第一行有错误.

EDIT!它必须是这样的:

EDIT! It has to be like this:

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

出于某些代码向后兼容性的原因,您可以使用以下内容:

For some code backward compatibility reasons you can use and the following:

override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath?) -> UITableViewCell {

只需更改!"用?"符号.我正在使用 Xcode 6 GM 种子.UITableViewDataSource 有一些变化.我遇到了同样的错误,但像这样改变它对我有用......

Just change the "!" signs with "?". I'm using Xcode 6 GM seed. There are some changes in UITableViewDataSource. Iwas geting the same error, but changing it like this work for me ...