我试着检查当前呈现的视图控制器的UIInterfaceOrientation,并出于某种原因它总是返回风景。UIViewController的UIInterfaceOrientation
UIInterfaceOrientation currentOrientation = (UIInterfaceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
if (currentOrientation == UIInterfaceOrientationPortrait){
self.scrollView_.colMargin = 50;
} else {
self.scrollView_.colMargin = 130;
}
任何想法为什么?
同样的事情,这并未” t也工作 – xonegirlz 2012-07-05 17:51:51
你锁定在横向模式?你有设置可以旋转的设备吗?有一百万的东西可以防止它,但我向你保证上面的代码奇妙:) – bgoers 2012-07-05 17:59:58
不,我不是..它被设置为与肖像和风景旋转 – xonegirlz 2012-07-05 21:09:55