/ Published in: Other

Expand |
Embed | Plain Text
//!< ç”»é¢å›žè»¢ã‚’許å¯ã™ã‚‹ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } //!< ç”»é¢å›žè»¢æ™‚ã«å‘¼ã²ã‚™å‡ºã•れる -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration { if(interfaceOrientation == UIInterfaceOrientationPortrait){ NSLog(@"縦(ホームボタン下)"); } else if(interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ NSLog(@"縦(ホームボタン上)"); } else if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft){ NSLog(@"縦(ホームボタンå³)"); } else if(interfaceOrientation == UIInterfaceOrientationLandscapeRight){ NSLog(@"縦(ホームボタン左)"); } } //--------------------------------------------------- //ç¾åœ¨ã®å›žè»¢æ–¹å‘ int direction = self.interfaceOrientation; //0 : 䏿˜Ž //1 : 縦(ホームボタン下) //2 : 縦(ホームボタン上) //3 : 横(ホームボタンå³) //4 : 横(ホームボタン左)
You need to login to post a comment.