0
我有一个标签栏应用程序,在一个选项卡中我有一个视图,有一个不同的项目(看)景观和肖像。我的问题是我如何处理这个功能。 感谢您的帮助。IOS:自定义风景和人像在标签栏应用程序
我有一个标签栏应用程序,在一个选项卡中我有一个视图,有一个不同的项目(看)景观和肖像。我的问题是我如何处理这个功能。 感谢您的帮助。IOS:自定义风景和人像在标签栏应用程序
我有类似的问题,处理它们。您可以通过以下方式查看方向:
UIViewController* vc = //your current view controller
UIInterfaceOrientation orientation = vc.interfaceOrientation;
// NSLog(@"orientation %@",orientation);
if(orientation == UIInterfaceOrientationLandscapeRight){...}
里面的if语句设置需要的布局。如果你使用nib文件,你可以通过self.view = portairtView;替代整个视图。可以在相同的笔尖中定义。你可以在视图的内部做同样的事情。
你可以像平时不使用
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
y问题是关于nib文件并在其上查看。 – mahyar