Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
- let reuseIdentifier = ...
- switch tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) {
- case let cell as TableViewCell1:
- cell.label?.text = texts[indexPath.row]
- return cell
- case let cell as TableViewCell2:
- cell.label?.text = texts[indexPath.row]
- cell.button?.setTitle(texts[indexPath.row], forState: .Normal)
- return cell
- default:
- abort()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement