【发布时间】:2017-01-28 10:52:15
【问题描述】:
【问题讨论】:
标签: objective-c uitableview tableview custom-cell
【问题讨论】:
标签: objective-c uitableview tableview custom-cell
You can use this code to shoe differnt cells:-
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
if indexPath.row = 0 // First Cell
{
let cell = tableView.dequeueReusableCellWithIdentifier(“YourCell”, forIndexPath: indexPath) as! YourCell
return cell
}
else if indexPath.row = 1 // Second Cell
{
let cell = tableView.dequeueReusableCellWithIdentifier(“YourCellWithTwoImages”, forIndexPath: indexPath) as! YourCellWithTwoImages
return cell
}
// Add Condtions for cells
}
【讨论】: