Reputation: 201
I have a uitable with custom uitableviewcells. I have a uilabel defined at the top right of the cell. When I enter into the edit mode, as the left red button comes in the view the whole cell moves to right side and my label is moving outside the view. How can I scale the uilabel to fit into my view ?
Upvotes: 1
Views: 922
Reputation: 10333
The only way I found is to do this in a custom UITableViewCell:
- (void)layoutSubviews {
[super layoutSubviews];
CGRect b = self.contentView.bounds;
if (self.editing) {
// You can adapt 'b' a bit in editing mode for good measure...
b.origin.x += 2;
b.size.width -= 4;
}
// Layout your view accordingly to 'b' as usual
Upvotes: 1