I use Any-Any Size in Storyboard
and define the following constraints for UITableViewCell
,
- Leading Space To SuperView -16.00px
- Trailing Space To SuperView -16.00px
- Top Space to SuperView 0.00px
- Bottom Space to SuperView 0.00px
When I print the frame of the UITableViewCell
For all sizes of iphone,i get the frame size
BookTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"BookTableViewCellID"];
if (cell==nil) {
cell = [[BookTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"BookTableViewCellID"];
}
NSLog(@"TextView Cell Frame %@ ",NSStringFromCGRect( cell.contentView.frame));
And the output, textView cell frame {{0, 0}, {600, 44}}. Here width is 600 which is same as the width for Any-Any Size.
But for iPhone5, i expect the width here 320. How Can i get the auto-resized width of the UITableViewCell
.