Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for view in yourTableViewCell?.subviews as! [UIView]{
- if let label = view as? UILabel {
- label.removeFromSuperview()
- }
- }
- func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
- var cell:CustomUITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as CustomUITableViewCell
- cell.textLabel?.text = self.items[indexPath.row]
- return cell
- }
- class CustomTableViewCell : UITableViewCell {
- @IBOutlet var backgroundImage: UIImageView
- @IBOutlet var titleLabel: UILabel
- }
- yourTableViewCell.contentView.subviews.forEach { $0.removeFromSuperview() }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement