开发者

iphone device orientation

During inAppPurchase, the sto开发者_JAVA百科reKit will ask the username and password

even though i set...

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];

It ask Username and password in Portrait Mode... In general How to solve this kind of issue.

UPDATED : But the InAppPurchase message on successful purchase is coming in landscape mode.

Thanks in advance,


As of 3.2 you cannot change the orientation of a running application from code.

But you can start an application with a fixed orientation, although doing so this is not straightforward.

Try with this recipe:

  1. set your orientation to UISupportedInterfaceOrientations in the Info.plist file
  2. in your window define a 480x320 "base view" every other view will be added to
  3. in all view controllers set up the shouldAutorotateToInterfaceOrientation: method (to return the same value you defined in the plist, of course)
  4. in all view controllers set a background view with

    self.view.frame = CGRectMake(0, 0, 480, 320)

    in the viewDidLoad method that should do the trick.

References:

  • http://www.iphonedevsdk.com/forum/iphone-sdk-development/7366-interface-builder-landscape-design.html#post186977
  • http://www.iphonedevsdk.com/forum/iphone-sdk-development/7366-interface-builder-landscape-design.html#post190014
  • iPhone app in landscape mode, 2008 systems


Have you tried setting your entire application in landscape from the Info.plist?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜