2011-03-19 3 views
2

안녕하세요 내 앱에 모달 뷰 컨트롤러가 있습니다. 특정 버튼을 누르면 화면에 UITableView가있는보기가 탐색 컨트롤러를 사용하여 위치로 슬라이드됩니다. 내가 버튼을 모달 뷰 컨트롤러가 사라지는 대신 다음보기로 응용 프로그램 충돌을 탐색하는 않는다는 것을 누르면 porblem이며, 나는 다음과 같은 스택 수 :보기를 탐색 할 때 크래시가 발생합니다.

#0 0x01387a63 in objc_msgSend 
#1 0x0634a7d0 in ?? 
#2 0x003597f2 in -[UITransitionView notifyDidCompleteTransition:] 
#3 0x0035a339 in -[UITransitionView _didCompleteTransition:] 
#4 0x0652961f in -[UITransitionViewAccessibility(SafeCategory) _didCompleteTransition:] 
#5 0x002fe665 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] 
#6 0x002fe4f7 in -[UIViewAnimationState animationDidStop:finished:] 
#7 0x00e426cb in run_animation_callbacks 
#8 0x00e42589 in CA::timer_callback 
#9 0x01206fe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 
#10 0x01208594 in __CFRunLoopDoTimer 
#11 0x01164cc9 in __CFRunLoopRun 
#12 0x01164240 in CFRunLoopRunSpecific 
#13 0x01164161 in CFRunLoopRunInMode 
#14 0x01b5a268 in GSEventRunModal 
#15 0x01b5a32d in GSEventRun 
#16 0x002dc42e in UIApplicationMain 
#17 0x000021dc in main at main.m:14 

응용 프로그램에 어떤 문제가 있습니까? 감사합니다

+0

코드를 깔끔하게 또는 포괄적으로 질문을 편집하십시오. – Tirth

답변

1

두 이벤트의 타이밍으로 인해 문제가 발생했습니다 ... 먼저 한 가지 작업을 수행하여 모델보기를 닫은 다음 타이머를 사용하여 약 다음에 다음보기로 이동합니다. 3 초 ... 이렇게 ...

[self.navigationController dismissModalViewControllerAnimated:YES]; 

[self performSelector:@selector(moveOn) withObject:nil afterDelay:3.5]; 


-(void)moveOn 

{ 

    SecondView *secondView = [[SecondView alloc] initWithNibName:@"" bundle:nil]; 
    [self.navigationController pushViewController:secondView animated:YES]; 
    [secondView release]; 

} 
관련 문제