2011-07-28 30 views

回答

0

我有类似的问题,处理它们。您可以通过以下方式查看方向:

UIViewController* vc = //your current view controller 
    UIInterfaceOrientation orientation = vc.interfaceOrientation; 
// NSLog(@"orientation %@",orientation); 
    if(orientation == UIInterfaceOrientationLandscapeRight){...} 

里面的if语句设置需要的布局。如果你使用nib文件,你可以通过self.view = portairtView;替代整个视图。可以在相同的笔尖中定义。你可以在视图的内部做同样的事情。

0

你可以像平时不使用

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
+0

y问题是关于nib文件并在其上查看。 – mahyar

相关问题