Your SlideShare is downloading. ×
0
CocoaHeads Rennes  13 octobre 2011                    Thomas Dupont  La r tation sur iOS
Comment supporter les orientations ?
Project
UIViewController- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation{   return UIInterfaceOr...
Comment gérer la rotation ?
UIView             @property (nonatomic) UIViewAutoresizing autoresizingMaskenum {   UIViewAutoresizingNone,   UIViewAutor...
UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin|                             UIViewAut...
UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin|                             UIViewAut...
UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth|                             UIViewAutoresi...
UIViewController- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)orientation                     ...
Comment être prévenu des rotations ?
UIWindow  makeKeyAndVisibleUIWindowLevelNormal  UIWindowLevelAlertUIWindowLevelStatusBar
UIViewControllerUIWindow                            UIView                  UIViewController                            UI...
Démo
Comment gérer manuellement la rotation d’une UIView ?
connaître l’orientation          @property (nonatomic) UIInterfaceOrientation statusBarOrientation           @property (no...
UIWindow           width(0, 0)                    height
UIWindow                   heightwidth        (0, 0)
changement d’orientationUIApplicationWillChangeStatusBarOrientationNotificationUIApplicationDidChangeStatusBarOrientationNo...
Démo
Merci
Upcoming SlideShare
Loading in...5
×

CocoaHeads Rennes #4 : la rotation sur iOS

811

Published on

Published in: Technology, Business, Real Estate
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
811
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "CocoaHeads Rennes #4 : la rotation sur iOS"

  1. 1. CocoaHeads Rennes 13 octobre 2011 Thomas Dupont La r tation sur iOS
  2. 2. Comment supporter les orientations ?
  3. 3. Project
  4. 4. UIViewController- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation{ return UIInterfaceOrientationIsLandscape(orientation);}
  5. 5. Comment gérer la rotation ?
  6. 6. UIView @property (nonatomic) UIViewAutoresizing autoresizingMaskenum { UIViewAutoresizingNone, UIViewAutoresizingFlexibleLeftMargin, UIViewAutoresizingFlexibleWidth, UIViewAutoresizingFlexibleRightMargin, UIViewAutoresizingFlexibleTopMargin, UIViewAutoresizingFlexibleHeight, UIViewAutoresizingFlexibleBottomMargin};
  7. 7. UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin| UIViewAutoresizingFlexibleTopMargin| UIViewAutoresizingFlexibleRightMargin| UIViewAutoresizingFlexibleBottomMargin)];
  8. 8. UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin| UIViewAutoresizingFlexibleBottomMargin)];
  9. 9. UIViewAutoresizing[myView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth| UIViewAutoresizingFlexibleTopMargin| UIViewAutoresizingFlexibleBottomMargin)];
  10. 10. UIViewController- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration - (void)didRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration
  11. 11. Comment être prévenu des rotations ?
  12. 12. UIWindow makeKeyAndVisibleUIWindowLevelNormal UIWindowLevelAlertUIWindowLevelStatusBar
  13. 13. UIViewControllerUIWindow UIView UIViewController UIView UIViewController @property (nonatomic, retain) UIViewController *rootViewController
  14. 14. Démo
  15. 15. Comment gérer manuellement la rotation d’une UIView ?
  16. 16. connaître l’orientation @property (nonatomic) UIInterfaceOrientation statusBarOrientation @property (nonatomic, readonly) UIDeviceOrientation orientationtypedef enum { UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait, UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown, UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight, UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft} UIInterfaceOrientation;typedef enum { UIDeviceOrientationUnknown, UIDeviceOrientationPortrait, UIDeviceOrientationPortraitUpsideDown, UIDeviceOrientationLandscapeLeft, UIDeviceOrientationLandscapeRight, UIDeviceOrientationFaceUp, UIDeviceOrientationFaceDown} UIDeviceOrientation;
  17. 17. UIWindow width(0, 0) height
  18. 18. UIWindow heightwidth (0, 0)
  19. 19. changement d’orientationUIApplicationWillChangeStatusBarOrientationNotificationUIApplicationDidChangeStatusBarOrientationNotification statusBarOrientationAnimationDuration
  20. 20. Démo
  21. 21. Merci
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×