1

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

1 回答 1

2

要启用 4 英寸显示器支持,您需要在项目的根目录中添加一个名为Default-568h@2x.png.

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

于 2013-04-21T22:11:59.303 回答