#author("2016-12-13T15:58:36+09:00","default:wikiwriter","wikiwriter")
[[UIKit]]

&tag(UIKit/画面遷移);
*目次 [#q1141e67]
#contents
*関連ページ [#ha90c0f8]
*参考情報 [#m1704b78]


*モーダル表示 [#e8acee93]
#pre{{
    OtherViewController* controller = [[OtherViewController alloc] initWithStyle:UITableViewStyleGrouped];
    [self presentModalViewController:newNavi animated:YES];
    [controller release];
}}

*テーブルセル選択時の遷移 [#p44c7192]
-Master Detailのセルを確認すると、selectedコールバックに直接showDatail Segueが結びつけられている。

*プログラム呼び出しでセグエを利用して戻る [#h5d275ac]
-戻り先のViewControllerにスタブを作成しておく。
#pre{{
    @IBAction func unwindToTop(segue: UIStoryboardSegue) {
    }
}}
-Interface Builderで遷移先のビューコントローラーをExitアイコンにドロップし、unwindToTopを選択。名前を例えば"back"としておく。
-以下のようにボタンが押されたときのイベントハンドラで呼び出す。
#pre{{
    func cancel(button: UIBarButtonItem) {
        performSegue(withIdentifier: "back", sender: self)
    }
}}

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS