无法将应用程序迁移到iphone5视网膜4

时间:2013-04-21 21:50:32

标签: iphone ios objective-c

我已经将一些应用程序迁移到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];

1 个答案:

答案 0 :(得分:2)

要启用4英寸显示支持,您需要将文件添加到名为 Default-568h@2x.png 的项目根目录中。

很容易搞清楚,对吧? :)