Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. for view in yourTableViewCell?.subviews as! [UIView]{
  2. if let label = view as? UILabel {
  3. label.removeFromSuperview()
  4. }
  5. }
  6.  
  7. func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
  8. var cell:CustomUITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as CustomUITableViewCell
  9.  
  10. cell.textLabel?.text = self.items[indexPath.row]
  11.  
  12. return cell
  13. }
  14.  
  15. class CustomTableViewCell : UITableViewCell {
  16. @IBOutlet var backgroundImage: UIImageView
  17. @IBOutlet var titleLabel: UILabel
  18. }
  19.  
  20. yourTableViewCell.contentView.subviews.forEach { $0.removeFromSuperview() }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement