• 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: iPhone Orientation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone Orientation


  • Subject: Re: iPhone Orientation
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 08 Dec 2008 08:51:56 -0700

UIViewController has methods that are called to notify that the iPhone will, is, or has rotated:

- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
- (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientationduration: (NSTimeInterval)duration
- (void)willAnimateFirstHalfOfRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration
- (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation duration: (NSTimeInterval)duration
- (void)didRotateFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation


All you would need to do is implement any of those in your ViewController to rearrange your interface appropriately. You can call [self setVew:someNewUIView] in a method, or whatever.

Cheers,

Dave

On Dec 6, 2008, at 10:19 AM, Bruce Martin wrote:

I'm not sure this is the right list but a search in the Archives returned no results for this question so that makes this question a simple one, or maybe no one else has had an issue with it.
I am trying to get notifications that the orientation of the iPhone has changed, if it changed then I want to change the view to a new view which will contain different information than the original upright view.


I tried looking for some examples or tutorials but can't find anything so the more basic your answer the better :)
Thanks
Bruce Martin
_______________________________________________

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


  • Follow-Ups:
    • Re: iPhone Orientation
      • From: Bruce Martin <email@hidden>
References: 
 >iPhone Orientation (From: Bruce Martin <email@hidden>)

  • Prev by Date: Re: What does 'DO' mean?
  • Next by Date: Re: iPhone Orientation
  • Previous by thread: iPhone Orientation
  • Next by thread: Re: iPhone Orientation
  • Index(es):
    • Date
    • Thread