overrIDe func tableVIEw(tableVIEw: UItableVIEw,cellForRowAtIndexPath indexPath: NSIndexPath,object: PFObject) -> PFtableVIEwCell{ var cell = tableVIEw.dequeueReusableCellWithIDentifIEr("CustomCell") as! CustomtableVIEwCell! if cell == nil { cell = CustomtableVIEwCell(style: UItableVIEwCellStyle.Default,reuseIDentifIEr: "CustomCell") } // Extract values from the PFObject to display in the table cell if let username = object["username"] as? String { cell.customUser.text = username } if let Title = object["Title"] as? String { cell.customTitle.text = Title } // display image var initialthumbnail = UIImage(named: "Swarm_Bee.png") if let thumbnail = object["imagefile"] as? PFfile { thumbnail.getDataInBackgrounDWithBlock{ (imageData,error) -> VoID in if error == nil { let image = UIImage(data: imageData!) cell.customImage.image = image }} } return cell
}
收到以下错误
overrIDing method with selector 'tableVIEw:cellForRowAtIndexPath:object:' has incompatible type '(UItableVIEw,NSIndexPath,PFObject) -> PFtableVIEwCell'
我查找了所有兼容性错误(删除!).另一篇文章有类似的问题:
Parse SDK 1.7.1 not working in Xcode 6.3
但只有他们的3号错误.该帖子中的所有其他问题都已得到解决,但此错误仍然存在.任何解决方案或建议在哪里看?
解决方法 我想到了.使用以下覆盖功能:overrIDe func tableVIEw(tableVIEw: UItableVIEw,object: PFObject?) -> PFtableVIEwCell? { //... }
不同之处在于制作PFObject和PFtableVIEwCell选项.
总结以上是内存溢出为你收集整理的Xcode 6.3解析SDK 1.7.1 PFTableViewCell错误“具有不兼容的类型”全部内容,希望文章能够帮你解决Xcode 6.3解析SDK 1.7.1 PFTableViewCell错误“具有不兼容的类型”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)