가장 쉬운 방법은 앱 위임자에 탐색 컨트롤러를 만드는 것입니다. 그런 다음 컨트롤러로 쉽게 뷰를 밀고 팝 할 수 있습니다. 이런 식으로 뭔가 (이 앱 위임의 applicationDidFinishLaunching
내에서 잘 작동) : 다음
// controller is defined in the header
controller = [[UINavigationController alloc] init];
controller.navigationBar.barStyle = UIBarStyleBlack;
...
// Build your UIView
SomeUIView *welcome = [[SomeUIView alloc] initWithNibName: @"Welcome" bundle: nil];
[controller pushViewController: welcome animated: NO];
[welcome release];
...
// Display the Controller's top view in the window
[window addSubview: controller.view];
[window makeKeyAndVisible];
(이 코드는 응용 프로그램에서 어디에서나 적용) 조회수을 변경하려면 :
SomeOtherView *Detail = [[SomeOtherView alloc] initWithNibName:@"Detail" bundle:nil];
[self.navigationController pushViewController: Detail animated:YES];
[Detail release];
공지 사항 당신은 항상 얻을 수 있습니다 "self
"을 통해 내비게이션 컨트롤러로 돌아갑니다.
굿 릭!