iphone - Rotating UIViewController Problem -
i have following code display uiviewcontroller in horizontal orientation ontop of uitableviewcontroller.
-(void)willanimaterotationtointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration { if (tointerfaceorientation == uiinterfaceorientationlandscapeleft || tointerfaceorientation == uiinterfaceorientationlandscaperight) { [self.view addsubview:landscapechartviewcontroller.view]; } if (tointerfaceorientation == uiinterfaceorientationportrait || tointerfaceorientation == uiinterfaceorientationportraitupsidedown) { if(landscapechartviewcontroller != nil) [landscapechartviewcontroller.view removefromsuperview]; } }
when phone rotates, view doesn't take entire screen.
the user able scroll, showing rest of uitableviewcontroller. don't want uitableviewcontroller there in horizontal orientation.
try [self.view addsubview:landscapechartviewcontroller.view];
assuming you've set frames correctly, should you're looking for.
Comments
Post a Comment