Prevent indentation of UITableViewCell (contentView) while editing

前端 未结 9 753
心在旅途
心在旅途 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:09

    Based on Usman.3D

    On the storyboard, a property indent While Editing is checked by default. It can be unchecked manually. It equals to cell.shouldIndentWhileEditing = NO.

    0 讨论(0)
  • 2020-12-05 03:14

    Have you looked at UITableViewCell's shouldIndentWhileEditing and indentationLevel properties? Those might sort it.

    0 讨论(0)
  • 2020-12-05 03:14

    A little late,

    but I solved the problem by switching off the Autoresizing Mask for all views in my TableViewCell:

    [<viewInCell> setAutoresizingMask:UIViewAutoresizingNone];
    

    Or switch off Autoresizing of width and/or height directly in Interface Builder.

    0 讨论(0)
提交回复
热议问题