2010-01-07 6 views
4

모달보기 컨트롤러가 해제되지 않도록하려면 어떻게해야합니까? dismissModalViewControllerAnimated가 항상 작동하지 않는 것을 발견했습니다. 예를 들어이 작동하지 않습니다dismissModalViewControllerAnimated가 항상 작동하지 않습니까?

SettingsViewController* settings = [[SettingsViewController alloc] init]; 
UINavigationController *settingsNav = [[UINavigationController alloc] initWithRootViewController:settings]; 
[navigationController presentModalViewController:settingsNav animated:YES];  
[navigationController dismissModalViewControllerAnimated:YES]; 

감사합니다!

답변

5

지나치게 많은 네비게이션 애니메이션을 너무 가깝게 만들려고하면 일반적으로 작동하지 않습니다. 0.75 초의 지연 후 dismissModalViewControllerAnimated를 해보십시오.

0
SettingsViewController* settings = [[SettingsViewController alloc] init]; 
UINavigationController *settingsNav = [[UINavigationController alloc] initWithRootViewController:settings]; 
[navigationController presentModalViewController:settingsNav animated:YES]; 
[settingsNav dismissModalViewControllerAnimated:YES]; 

SettingsViewController 경우는 다음의 UIViewController의 :

SettingsViewController* settings = [[SettingsViewController alloc] init]; 
[self presentModalViewController:settings animated:YES]; 
[settings dismissModalViewControllerAnimated:YES]; 
관련 문제