티스토리 뷰

방향 변경에 대한 알림을받는 방법을 모르지만-(void) orientationChanged : (NSNotification *) notification을 사용합니다. 이것은 imo가 나를 위해 충분히 빠른 시뮬레이터에서 적어도 초당 두 번보다 빠르게 업데이트합니다.

아 그래, 문제가 있었어. 사과 또는 그 doco의 예제 앱에서 (기억할 수 없습니다) 다음을 사용합니다.

  • (void) orientationChanged : (NSNotification *) notification {[self performSelector : @selector (updateLandscapeView) withObject : nil afterDelay : 0]; }

당신이하는 방법을 만드는 것보다

  • (void) updateLandscapeView {if (UIDeviceOrientationIsLandscape (deviceOrientation) &&! isShowingLandscapeView) {[self presentModalViewController : scheduleMonth animated : YES]; isShowingLandscapeView = 예; } else if (deviceOrientation == UIDeviceOrientationPortrait && isShowingLandscapeView) {[self dismissModalViewControllerAnimated : YES]; isShowingLandscapeView = 아니요; }}

updateLandscapeView에서 호출되는 별도의 클래스에 가로 방향을 넣었습니다.

복잡한 가로보기가있는 경우 스레드에서로드 할 수 있으며 세로로 돌아 가면 스레드를 중지하고보기를 닫습니다. 사용자가 신속하게 수행하면 가로보기를 얻지 못할 수 있지만 결함이 발생하지 않거나 가로 또는 세로보기에 멈춰 있지 않음을 의미합니다.



출처
https://stackoverflow.com/questions/1904932
댓글
공지사항
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31