objective c - When rotating my viewController, the status bar doesn't rotate with the with. How to fix it? -
everyone. i've got ios6 ipad app update. problem met 1 view controller needs autorotate, , don't find out correct method this.
i've tried following link , partly helped: only having 1 view autorotate in xcode?
but when rotate viewcontroller, status bar doesn't rotate view , title of view doesn't stay in center set.
i add breakpoints in viewcontroller, , find when device landscape calls - (void)willrotatetointerfaceorientation:(uiinterfaceorientation)tointerfaceorientation duration:(nstimeinterval)duration.
i wonder if can tell me bug hides , how fix it. in forward.
i've solved problem. mistake added words below when setting autorotation issue.
cgaffinetransform landscapetransform = cgaffinetransformmakerotation(degreestoradian(0)); landscapetransform = cgaffinetransformtranslate (landscapetransform, 0.0, 0.0); self.view.bounds = cgrectmake(self.view.bounds.origin.x, self.view.bounds.origin.y, 768, 1024); if (isvisible == no) return; // ios present modal bodge [self updatescrollviewcontentviews]; // update content views lastappearsize = cgsizezero; // reset view size tracking [self.view settransform:landscapetransform]; i deleted these manual words , leave following methods alone. it's done.
-(nsuinteger)supportedinterfaceorientations { return uiinterfaceorientationmaskall; } - (bool)shouldautorotate { return yes; } - (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation { return yes; }
Comments
Post a Comment