2
votes

I create the iPhone app that working in Landscape mode only.
It works well on iPhone.
On iPad, UIButtons does not respond any touches at launch although UIButtons are displayed correctly.
After Tapping 2x button, UIButtons works well.

why?

This is occurred in the process below.

  1. Create new project with Single View Application Template.
  2. Set Landscape Left and Landscape Right at Supported Interface orientation in TARGET.
  3. Drag and Drop UIButton to View in Storyboard.
  4. Run the app on iPad

After that,the apps launches on Landscape mode but UIButtons does not respond any touch.

1

1 Answers

0
votes

Try both of these things and it should work, I had this same issue. First make sure to set the root view controller in the App Delegate didFinishLaunching method. Second make sure to add the supported orientations in your view controller. The way to support orientations changed in iOS 6.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{   
    [self.window setRootViewController:tabBarController];   
    return YES;
}

To support landscape, add this:

- (BOOL)shouldAutorotate
{
    return  YES;
}
- (NSUInteger)supportedInterfaceOrientations 
{
    return UIInterfaceOrientationMaskLandscape;
}

Hopefully this helps.