0

this is the screen shot of storyboardSWRevealViewController 내가 <code>SWRevealViewController</code>를 사용하여이 코드를 사용하여 다른 뷰 컨트롤러를 추진하기 위해 노력하고있어 이전

에 뷰 컨트롤러를 팝업 할 수 없습니다

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"main" bundle:nil]; 
MyprofileQRsViewController *rootViewController = [storyboard instantiateViewControllerWithIdentifier:@"SBMyprofileDetails"]; 
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; 
[navController setViewControllers: @[rootViewController] animated: YES]; 

[self.revealViewController setFrontViewController:navController]; 
[self.revealViewController setFrontViewPosition: FrontViewPositionRight animated: YES]; 

그것이 잘 작동을하지만 난 할 수 없습니다 해당보기 컨트롤러를 이전보기 컨트롤러로 이동하십시오. 모든 기본 popViewcontrollers 코드가 여전히 작동하지 않습니다. 나는 무엇을 해야할지 모르겠습니다. 는 몸이 응답하시기 바랍니다 .. 사전에 감사 할 어떤 트릭을 .... 가지고하시기 바랍니다

+0

당신은 (순서대로) 내가 어떤 '다른 뷰 컨트롤러가있는 것처럼이 그 같은 –

+0

을 표시 할 수 있습니다 –

+0

을 MyprofileQRsViewController' 보지하고 스토리 보드 장면 –

답변

0

pushFrontViewController을 사용하십시오 : setFrontViewController 대신 :

코드는 다음과 같다 :

[revealController pushFrontViewController:frontController animated:YES]; 

도움이 될 수 있습니다.

그런 다음보기 컨트롤러에서 팝업 할 수 있습니다. 그 방법을 탐색 할 수 presentViewController 또는 pushViewController 중 하나를 사용

0

당신은 코드

UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 
// here you need to create storyboard ID of perticular view where you need to navigate your app 
UIViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"viewContIdentifire"]; 

// if use presentViewController this will not enables you to go back to previous view 
[self presentViewController:vc animated:NO completion:nil]; 
        **// OR** 
// using pushViewController lets you to go back to the previous view 
[self.navigationController pushViewController:vc animated:YES]; 

이하로 사용하여 다른 viewControllers에 응용 프로그램을 탐색 할 수 있습니다.


UI는 스택에있어서 popToRootViewControllerAnimated, popToRootViewControllerAnimated popToRootViewControllerAnimated 및 방법을 이용하여 다시 팝 처리한다.

// this takes your app to the root view controller 
[self.navigationController popToRootViewControllerAnimated:YES]; 

// this will takes you to the previous view loaded in stack 
[self.navigationController popToRootViewControllerAnimated:YES]; 

// this takes to any view controller, use accordingly 
[self.navigationController popToViewController:yourViewControllerName animated:YES];