Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
  2. let reuseIdentifier = ...
  3.  
  4. switch tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) {
  5. case let cell as TableViewCell1:
  6. cell.label?.text = texts[indexPath.row]
  7. return cell
  8.  
  9. case let cell as TableViewCell2:
  10. cell.label?.text = texts[indexPath.row]
  11. cell.button?.setTitle(texts[indexPath.row], forState: .Normal)
  12. return cell
  13.  
  14. default:
  15. abort()
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement