티스토리 뷰

iOS/자료정리

[iPhone]화면 회전

썩소천사 2011. 4. 13. 14:47
반응형
 

<참고사항>
//탭바에서 화면을 회전시키고자 할 경우 모든 컨트롤러에서 shouldAutorotateToInterfaceOrientation 에서 YES를 반환해 주어야함.
//특정 상황에서만 회전을 시키고자 할경우 모든 탭바 컨트롤러에서 동일한 if처리 해줘야함

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
	NSLog(@"화면을 회전 시킬지 여부");
	return YES;
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
	NSLog(@"회전하기 직전에 호출");
}

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
	NSLog(@"화면이 회전된 후");
}

-(void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
	NSLog(@"한 단계로 처리하려 할 때");
}

-(void) willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
	NSLog(@"두단계로 처리하려 할 때");
}

반응형

'iOS > 자료정리' 카테고리의 다른 글

[iPhone]NSMutableArray, NSArray  (0) 2011.06.10
[iPhone]AVAudioRecorder (음성 녹음) /*.wav로 변환/  (3) 2011.05.30
[iPhone]TabbarController  (0) 2011.04.12
[iPhone][UIApplication sharedApplication]  (0) 2011.04.07
[iPhone]NSDate  (0) 2011.03.18
댓글
반응형