我試着檢查當前呈現的視圖控制器的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