我尝试检查当前呈现的视图控制器的 UIInterfaceOrientation 并且由于某种原因它总是返回风景。
UIInterfaceOrientation currentOrientation = (UIInterfaceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
if (currentOrientation == UIInterfaceOrientationPortrait){
self.scrollView_.colMargin = 50;
} else {
self.scrollView_.colMargin = 130;
}
知道为什么吗?