11
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iPhone専用アプリをiPadで起動した時、下部のツールバーが表示されないという不具合に、開発者が行うべき対処法

11
Last updated at Posted at 2015-09-19

iOS9においてiPhone専用アプリをiPadで起動すると、アプリのリサイズが正しく行われないようです。下記のコードを追加すると解消されます。

AppDelegate.m

@synthesize window;
@synthesize mainController;

-(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
    BOOL ret = NO;
    window.rootViewController = mainController;
    // 下記の一行を追加
    mainController.view.frame = [[UIScreen mainScreen] bounds];
    [window addSubview:mainController.view];
    [window makeKeyAndVisible];
    return ret;
}
11
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?