프로그래밍/iOS
[iOS] UINavigationController
삶의안식처
2015. 5. 13. 16:21
presentViewController 방식으로 화면을 띄우다
테스트 용으로 navigationController쓰려고
self.navigationController에 push하니 안되는 현상 발견
이럴 때 사용 법
1. 호출 시
testViewController* testviewcon = [[testViewController alloc] initWithNibName:@"testViewController" bundle:[NSBundle giftCardBundle]];// 띄을 viewcontroller 초기화
UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:testviewcon]; // navigationController의 root를 띄울 viewController로 설정
[self presentViewController:navi animated:NO completion:nil]; // 화면 전환
2. 닫을 시
[self dismissViewControllerAnimated:NO completion:nil]; // 네비게이션 화면 닫음