我已经将一些应用程序迁移到 iPhone5,但使用这个我无法解决它。我遵循相同的步骤,但现在我没有 xib 布局来设置窗口的自动调整大小,因为 TabBarViewController 以编程方式定义为 rootController。我总是得到恼人的黑色前杠和顶杠。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
tabBarController = [[UITabBarController alloc] init];
NSArray *viewControllers = [NSArray alloc];
viewControllers = [NSArray arrayWithObjects: nil];
// Attach them to the tab bar controller
[self.tabBarController setViewControllers:viewControllers animated:NO];
// Put the tabBarController's view on the window.
[window addSubview:[self.tabBarController view]];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyWindow];
self.splashController = [[splashViewController alloc] initWithNibName:@"splashViewController" bundle:nil aidioma:self.idioma];
[self.window addSubview:[splashController view]];
[self.window makeKeyAndVisible];