[Swift] StoryBoardを使わずにViewのOpen/Closeを行う

githubはここ
https://github.com/longicorn/Not_Use_StoryBoard_View_OpenClose_Swift

スクリーンショットはこんな感じ

Swift Docsを見つつという感じですが、今回はタブを作らず単独Viewからの画面遷移を行っています。

Viewを開く側はこれだけです。
openではなく、presentViewControllerなんですね。
TitaniumだとViewをopen/closeを行うのですが、こちらはあくまでも画面遷移なんですね。

        //ViewController
        let childViewController: UIViewController = ChildViewController()
        self.presentViewController(childViewController, animated: false, completion: nil)
nil)

        //ChildViewController
        self.dismissViewControllerAnimated(false, completion: nil)

修正:2015-02-02
閉じるときはdismissViewControllerAnimatedが正しいので修正しました