I tried checking the UIInterfaceOrientation of the current presented view controller and for some reason it always returns landscape.
UIInterfaceOrientation currentOrientation = (UIInterfaceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
if (currentOrientation == UIInterfaceOrientationPortrait){
self.scrollView_.colMargin = 50;
} else {
self.scrollView_.colMargin = 130;
}
Any idea why?
You can check the orientation as follows: