감사합니다
iOS7에
에 발생합니다. C보기 컨트롤러에 아래의 코드를 사용해보십시오 :
let presentingVC = self.presentingViewController!
let navigationController = presentingVC is UINavigationController ? presentingVC as? UINavigationController : presentingVC.navigationController
navigationController?.popToRootViewControllerAnimated(false)
self.dismissViewControllerAnimated(true, completion: nil)
을이 경우 사용자에 단지 모달 뷰 컨트롤러를 기각 볼 수 있습니다. 내비게이션 컨트롤러의 팝업보기 컨트롤러는 배경에서 만들어집니다.
또 다른 옵션은 모달 뷰 컨트롤러를 없애고 그 후에 애니메이션을 사용하여 루트보기 컨트롤러로 이동 한 다음 사용자가 모든 것을 보게됩니다. 아래 코드 :
let presentingVC = self.presentingViewController!
let navigationController = presentingVC is UINavigationController ? presentingVC as? UINavigationController : presentingVC.navigationController
self.dismissViewControllerAnimated(true, completion: {() -> Void in
navigationController?.popToRootViewControllerAnimated(true)
return
})