标签: pftableviewcell

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
查看次数

PFQueryTableView自定义单元格分隔符未显示

在我的PFQueryTableViewController,习惯PFTableViewCell's没有任何分隔符,我不知道为什么.

在此输入图像描述

googeling时我没有找到任何东西.

我究竟做错了什么?

    class CategoryTableViewController: PFQueryTableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
            }

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        self.loadObjects()
    }


    // Initialise the PFQueryTable tableview
    override init(style: UITableViewStyle, className: String?) {
        super.init(style: style, className: className)
    }

    required init(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)

        // Configure the PFQueryTableView
        self.parseClassName = "Category"

        self.pullToRefreshEnabled = true
        self.paginationEnabled = false


    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // Mark - …
Run Code Online (Sandbox Code Playgroud)

ios parse-platform swift pfquerytableviewcontrolle pftableviewcell

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