Is it possible to keep the contentView.frame
always the same, regardless of tableView.editing
? I already tried to override layoutSubviews
and willTransitionToState
but those options fizzled out too. I can't seem to be able to change the width of the contentView. Or maybe my approach ist just plain impossible ...
Maybe there is another way to solve this.
The behaviour I want to achieve is the following: I want the standard textLabel
of a UITableViewCell
to be always indented and not change position when the tableView enters editing mode. The problem I will probably face is that the behaviour of the detailTextLabel
will have to be corrected (e.g. truncation of text if textLabel
content is too long). The reason why I don't want to implement my own UILabel
is because a custom subviews will decrease the scrolling performance by a significant amount.
I hope that anyone already implemented something like this in their UITableView
and could show me a solution to this tedious problem. Thanks in advance!
EDIT: I'm dealing with a UITableView
in plain and not grouped style.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…