1

사용하여 다른 탐색 컨트롤러의 VC로 다시 탐색 컨트롤러 통과 할 수 없습니다의 notificationsVCnavigationContoller에 포함 된 TabBarController의 일부 (첫번째 nC로 호출 할 수 있습니다). 그런 다음 notificationsVC에서 messagesVC를 표시 할 두 번째 navigationController까지 segue를 참조하십시오.는 아래에서 볼 수 있듯이 스위프트

'거기있는 navigationController 가장 가까운 NC를 얻을 수 있기 때문에 지금이 분명히 작동하지 않습니다 notificationsVC

func backbutton() {   
    navigationController?.popViewControllerAnimated(true)   
} 

로 돌아가서 그 스택에 VC 팝업해야 누르면 messagesVC에서 뒤로 가기 버튼입니다하지만 원 다시 notificationsVC으로 돌아가겠습니다.

다른 대안?, 비록 내가 성공하지 못했지만 시도했습니다.

self.dismissViewControllerAnimated(true, completion: nil); 

enter image description here

더 상세보기 enter image description here

또한 내가 문제가 아니라 언급 여전히 가치가 안 messagesVC의 메시지를 표시하도록 JSQMessagesViewController 라이브러리를 사용하고 있습니다. 시간 내 줘서 고마워!

+0

'있는 navigationController .navigationController .popViewControllerAnimated (참)'팝보기 :

그래서 나는 다시 버튼 클릭에 다음과 같이 수행하는 것이 좋습니다 . –

답변

0

시도 : - :

tabBarController?.navigationController?.popViewControllerAnimated(true) 

당신에게서 또한 요구 네비게이션 컨트롤러는 두 번째 탐색 컨트롤러가 작동합니다 :

let nVC = self.navigationController?.tabBarController?.navigationController?.storyboard?.instantiateViewControllerWithIdentifier("NotificationStoryboardVC_ID") as! NotificationVC 

navigationController?.tabBarController?.navigationController?.pushViewController(nVC, animated: true) 
+0

이 (가) 게시물을 업데이트했습니다. –

+0

NotificationStoryboardVC_ID는 속성 검사기에서 설정 한 것과 동일합니다. 또한 pushViewController는 문자열을 가져 오지 않습니다. –

+0

내 나쁜 ...;), 나는 대답을 편집했지만, 나는 이미 이것을 시도 했나? – Dravidian

0

당신은 아래의 코드처럼 TabBarViewController에서 요청에 의해 처음 NavigationViewController에 액세스 할 수 있습니다

navigationController?.navigationController?.popViewControllerAnimated(true) 
+0

감사하지만 둘 다 작동하지 않습니다. –

0

네비게이션 컨트롤러에는 하나의 VC ie Mess 연령대 따라서 팝하면 네비게이션 컨트롤러의 스택에 다른 VC가 나타나지 않습니다. NotificationsVC가 탐색 컨트롤러의 스택에 없습니다. ???있는 navigationController의있는 navigationController에서

tabBarController .selectedIndex = Index_Of_NotificationsVC

관련 문제