I have a custom cell in storyboard. I've set iPhone 4.7 inch in storyboard for the viewController
that contains its tableView
.
Since I want to lay out some UIImageViews
in a scrollView
that is inside this cell, I need to know the width of the cell. I'm trying to get this width inside the layoutSubviews
, like following:
-(void)layoutSubviews
{
[super layoutSubviews];
CGFloat cellWidth = self.contentView.bounds.size.width;
}
It gets called multiple times, and when I run it on iPhone 5 the first two times are not correct(it's 375 which is what it is on the storyboard, and afterward it's 320 which is the correct size)
How do I get the real width of the cell, anyway?
Thanks in advance.