objective c - iOS 6 custom grouped UITableViewCell incorrect size -
i have created uitableviewcell subclass contains uitextfield. when add cell grouped table view in ios 6 cell gets extended table view edges.

here code custom cell.
#import "activitynameeditcell.h" @implementation activitynameeditcell - (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier { self = [super initwithstyle:style reuseidentifier:reuseidentifier]; if (self) { self.textfield = [[uitextfield alloc] init]; [self addsubview:self.textfield]; } return self; } - (void)setselected:(bool)selected animated:(bool)animated { [super setselected:selected animated:animated]; // configure view selected state } - (void)layoutsubviews { self.textfield.frame = cgrectmake(self.contentview.frame.origin.x + 10, 0, self.frame.size.width - self.contentview.frame.origin.x - 10, self.frame.size.height); } @end this same cell class lays out correctly in ios 7

is there glaringly obvious i've done wrong? how can fix cell in ios 6?
i forgot call [super layoutsubviews] in layoutsubviews implementation. derp...

Comments
Post a Comment