i have an app that have a scroll view embeded in main view like follow (that is programmatically set constraints with Masonry, hope its easy to understand that scroll view just fit in main view):
[self.mainScroll mas_makeConstraints:^(MASConstraintMaker * make) {
@strongify(self)
make.top.mas_equalTo(self.view);
make.left.mas_equalTo(self.view);
make.right.mas_equalTo(self.view);
make.bottom.mas_equalTo(self.view);
}];
- (void)viewWillLayoutSubviews {
self.mainScroll.contentSize = (CGSize){self.view.bounds.size.width - 4, NEWS_HEIGHT + 2 + (ITEM_HEIGHT + 1) * self.viewModel.arrValues.count/2 + (ITEM_HEIGHT + 1) * (self.viewModel.arrValues.count % 2) + PLUS_BAR_HEIGHT };
}
In iPhone it work fine, it scrolls when it need, but in iPad it doesn't. I checked, and method calls many times, but, even if i explicitly set something like:
- (void)viewWillLayoutSubviews {
self.mainScroll.contentSize = (CGSize){self.view.bounds.size.width - 4, 2000 };
}
Any ideas why its happen?)