UITableViewCell content overlaps delete button when in editing mode in iOS7

前端 未结 11 1075
长情又很酷
长情又很酷 2020-12-15 07:50

I am creating a UITableView with custom UITableViewCells. iOS 7\'s new delete button is causing some problems with the layout of my cell.

I

11条回答
  •  青春惊慌失措
    2020-12-15 07:58

    If you are putting content in the UITableViewCell's contentView, be sure you use self.contentView.frame.size.width and not self.frame.size.width in layoutSubviews.

    self.frame expands width in editing mode, and will cause any content on the right to extend past the bounds of the contentView. self.contentView.frame stays at the correct width (and is what you should be using).

提交回复
热议问题