I have my mobile app in Objective C. I have a scroll view page. In Simulator iPad Pro it works. In Simulator iPhone 6 Plus, the scroll view starts at lower part of page and I cannot get it back up to top. In fact all of the iPhone ( 5,6,7) look like the iPhone 6 plus.ie the top of the page shows "Grade" and "County". I cannot scroll up to see "First Name". The only thing I am changing is the device.
Suggestions?
below is iPhone 6 Plus
SOLVED- During trying all several options, I forgot I had:
-(void)viewDidLayoutSubviews{
[super viewDidLayoutSubviews];
// REMOVE the LINES BELOW
[self.scroller layoutIfNeeded];
self.scroller.contentSize = self.contentView.bounds.size;
self.contentView.center = self.view.superview.center;
}
After removing the 3 lines above, it worked correctly in iPhone 5, 6, 7. The IPad worked WITH or WITHOUT those 3 lines. I spent a lot of time on this. I hope this helps others.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.