ios - UIScrollview shifting contents up after scrolling down and pushing new viewcontroler -
i have trouble figuring out issue on uiscrollview. contents inside uiscrollview move after clicking button push new view controller onto screen, , going original view controller. notice how the top of scrollview changes.

here code scrollview
- (void)viewdidload{ [super viewdidload]; [scroll setscrollenabled:yes]; [scroll setcontentsize:cgsizemake(923, 934)]; [self.view addsubview:scroll]; }
i solved problem
-(void)viewwillappear:(bool)animated{ [scroll setcontentoffset:cgpointmake(0,0)]; }
Comments
Post a Comment