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 ?
+1
A:
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
Zoran Simic
2009-09-21 10:12:24