안녕하세요, 버튼을 클릭하면 하나의보기 컨트롤러에서 다른보기 컨트롤러로 이동하기 위해 다음과 같은 목표 C 코드를 신속하게 변환하려고합니다. 어떤 도움이 많이보기 컨트롤러를 신속하게 프로그래밍 방식으로 표현하기
- (void)add:(id)sender {
// Create the root view controller for the navigation controller
// The new view controller configures a Cancel and Done button for the
// navigation bar.
RecipeAddViewController *addController = [[RecipeAddViewController alloc]
init];
// Configure the RecipeAddViewController. In this case, it reports any
// changes to a custom delegate object.
addController.delegate = self;
// Create the navigation controller and present it.
UINavigationController *navigationController = [[UINavigationController alloc]
initWithRootViewController:addController];
[self presentViewController:navigationController animated:YES completion: nil];
}
내 코드는 아래의 표시가 아니라 스토리 보드에 내 mainSectionViewController가 내장되어 있습니다, 네비게이션 컨트롤러에서 구현하는 방법을 잘되어이 애플의 프로그래밍 가이드에서 가져
을 감상 할 수있다 네비게이션 컨트롤러
func sectionBtnClicked (sender: UIButton!) {
let sectionController = self.storyboard?.instantiateViewControllerWithIdentifier("mainSectionsVC") as mainSectionViewController
let navController = UINavigationcontroler. ///not sure what actually comes here, any help would be appreciated
self.presentViewController(navController, animated: true, completion: nil)
}