ios - Custom UITableViewCell content doesn't move when editing -
i'm working on custom uitableviewcell editing. when enter editing mode, label not moved properly. code in .m file
- (id) init { self = [super init]; self.driverlabel.autoresizingmask = uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexibleheight; self.lastmessagelabel.autoresizingmask = uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexibleheight; [self.contentview addsubview:self.driverlabel]; [self.contentview addsubview:self.lastmessagelabel]; return self; } the custom cell mapped on cell in storyboard. labels placed on right position.
what om doing wrong here?
you should use fixed left margin because want left side of label stay fixed distance left side of content view, gets shifted right when enter editing mode.
you've used flexible left margin. when content view's width reduced, , if label no longer fits, label's left margin reduced , not appear shift right enough.
Comments
Post a Comment