为了获得两个垂直的表格视图,就像设置应用程序一样,我正在切换分割视图控制器。在我的iPad的AppDelegate我写了下面的代码:UIWindow子视图不会自动旋转
rootViewController.view.frame = CGRectMake(0, 20, 270, 1004);
[window addSubview:rootViewController.view];
detailViewController.view.frame = CGRectMake(270,20, 498, 1004);
[window addSubview:detailViewController.view];
[window makeKeyAndVisible];
这个伟大的工程把一切纵向露面只是因为它应该。但是,当我旋转设备我的rootViewController旋转,而详细信息视图控制器不。在我的两个控制器我实现
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; }
我在做什么错?
我能够创建一个顶级视图来包含我的细节和根控制器的视图。最典型的情况是,我会重写所有内容到一个控制器中,但这两个控制器已经有很多时间了。不理想,但它现在都在工作。 – alexcash
非常感谢。 – alexcash