• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: loading UIView in correct orientation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loading UIView in correct orientation


  • Subject: Re: loading UIView in correct orientation
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 18 Aug 2012 10:13:59 -0700

On Fri, 03 Aug 2012 23:22:17 +0700, "Gerriet M. Denkmann" <email@hidden> said:
>
>I have a subclass of UIViewController which displays a small view in the center of the display.
>shouldAutorotateToInterfaceOrientation: returns YES.
>This view is only shown on demand.
>
>
>The problem:
>If the device is in Portrait-Up position when the ViewController is created then everything is fine.
>Otherwise the centered view is loaded in the wrong position, and I have to rotate the device by 90° and back again, to get the centered view right.

Same answer as the email I just sent. Rotation of views, and especially the problem of launching into a rotated interface, is well discussed in my book, in that same chapter:

http://www.apeth.com/iOSBook/ch19.html

You're falling prey to an elementary mistake, namely setting up the size/position of the view too early (in response to the wrong event). m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: rotating UIView without changing size
  • Next by Date: Re: How to (slowly) rotate a view
  • Previous by thread: Re: stripped down webview
  • Next by thread: How to Write MissionControl/Expose Replacement
  • Index(es):
    • Date
    • Thread