2017-01-28 12 views

答えて

0
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 
} 
関連する問題