【发布时间】:2015-03-23 17:10:24
【问题描述】:
我想添加 2 个单元格作为标题,从前一个 tableview 开始,第二个单元格作为原型的细节。
第一个单元格类“courseCell” 第二单元格类“DetailsTVC”
我找到了很多方法,但它不起作用我希望有人帮助
I couldn't follow with this instruction Initialize your custom tableviewcell - CustomCell1 and CustomCell2 Since tableviewcell is a subclass of UIView you can add it as a subview.
[TableCell addSubview:CustomCell1];
[TableCell addSubview:CustomCell2];
cell?.addSubview(<#view: UIView>)
[cell ?.addSubview(<#view: UIView>)]
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!, object: PFObject!) -> PFTableViewCell {
var cell = tableView.dequeueReusableCellWithIdentifier("cell" , forIndexPath : indexPath) as? courseCell
if cell == nil
{
cell = courseCell(style: UITableViewCellStyle.Default, reuseIdentifier: "cell")
}
cell?.name.text = object["title"] as! String!
cell?.location.text = object["Location"] as! String!
return cell!
}
【问题讨论】:
标签: ios swift parse-platform tableview tableviewcell