Prevent indentation of UITableViewCell (contentView) while editing

前端 未结 9 756
心在旅途
心在旅途 2020-12-05 02:38

Is it possible to keep the contentView.frame always the same, regardless of tableView.editing? I already tried to override layoutSubviews

9条回答
  •  独厮守ぢ
    2020-12-05 03:05

    You will have to override layoutSubviews to do this. It applies for the level of custom indentation so it does for none.

    Please have a look at How can I change the amount of indentation on my custom UITableViewCell while editing?. I provided an example how to change the level of indentation. Though it didn't work 100% for the OP it worked in my example app. I think this will point you in the right direction.

提交回复
热议问题