【发布时间】:2010-04-18 14:24:55
【问题描述】:
我有一个应用程序,其代码如下:
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // UIWindow *window;
viewController = [TopicsViewController new]; //TopicsViewController *viewController; //This is a UITableViewController
navigationController = [UINavigationController new]; // UINavigationController *navigationController;
UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]];
[self.navigationController.view addSubview:background];
[self.navigationController.view sendSubviewToBack:background];
[navigationController pushViewController:viewController animated:YES];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
基本上我正在使用 UINavigationController,然后推送 UITableViewController 或有时是 UIViewController。 UIViewController 包含 UITextView、UIImage、UIScrollView 等元素。问题是我一直试图让这个应用程序响应 iphone 旋转,例如在横屏模式下,应用程序应该切换到横屏模式,反之亦然,但目前没有任何效果。
【问题讨论】:
标签: iphone-sdk-3.0 uinavigationcontroller uitableview autorotate