LoginSignup
1
1

More than 5 years have passed since last update.

Xcode 4.5 でビルド → iOS 6 で動かす → UITextField に何も入力できない

Posted at

ということがありました。

[self.window makeKeyAndVisible];

これが抜けていたせいでした。

テンプレから作ると、
AppDelegate.mのapplication:didFinishLaunchingWithOptions:に
デフォルトで書かれているのですが
何かの拍子に消してしまっていたみたいです。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

    self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible]; // ←コレ
    return YES;
}

なお、Xcode 4.3でビルドしたときはなぜか上手くいきます。

1
1
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
1
1