小编Rob*_*Rob的帖子

Xcode 6.3解析SDK 1.7.1 PFTableViewCell错误"具有不兼容的类型"

我的代码:

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? …
Run Code Online (Sandbox Code Playgroud)

xcode parsing uitableview swift pftableviewcell

5
推荐指数
1
解决办法
146
查看次数

标签 统计

parsing ×1

pftableviewcell ×1

swift ×1

uitableview ×1

xcode ×1