ios - Height did not update when switch from portrait to Landscape? -
i create uiscrollview, added other data in it, added subview self.view. problem when switch phone portrait landscape or vice versa not update height scrollview not work need to. here code:
uiscrollview *menuscroll = [[uiscrollview alloc]initwithframe:cgrectmake(0, 44+28+8, 130, self.view.frame.size.height)];
override didrotatefrominterfaceorientation method on viewcontroller , change frame of scrollview.
- (void)didrotatefrominterfaceorientation:(uiinterfaceorientation)frominterfaceorientation { [super didrotatefrominterfaceorientation:frominterfaceorientation]; self.menuscrollview.frame=cgrectmake(0,yposition,width,self.view.frame.size.height); }
Comments
Post a Comment