Posted By

saturngod on 10/28/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite



Get Orientation in iPhone


 / Published in: Objective C
 

  1. UIInterfaceOrientation currentOrient=[UIDevice currentDevice].orientation;
  2. if (currentOrient==UIInterfaceOrientationPortrait||
  3. currentOrient==UIInterfaceOrientationPortraitUpsideDown) {
  4. NSLog(@"portrait");
  5. }
  6. else if(currentOrient==UIInterfaceOrientationLandscapeLeft||
  7. currentOrient==UIInterfaceOrientationLandscapeRight)
  8. {
  9. NSLog(@"landscape");
  10. }

Report this snippet  

You need to login to post a comment.