Created
January 17, 2016 13:00
-
-
Save tdtsh/2154c3b79bac6fbebfd8 to your computer and use it in GitHub Desktop.
Swift2で NavigationController の子ウィンドウ閉じるとき2画面前に遷移させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ThirdViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// 1つ前のViewControllerを遷移リストから削除 | |
let parentIndex = (self.navigationController?.viewControllers.indexOf(self))! - 1 | |
self.navigationController?.viewControllers.removeAtIndex(parentIndex) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment