トップ «前の日記(2012-02-09) 最新 次の日記(2012-02-12)» 編集

Cocoa練習帳

iOS/iPhone/iPad/watchOS/tvOS/MacOSX/Android プログラミング, Objective-C, Cocoa, Swiftなど

2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|

2012-02-10 [iOS]Storyboards(その3)

もし、画面が遷移したタイミングを知りたいのなら、元のビュー・コントローラでUIViewControllerの- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)senderメソッドをオーバーライドする。

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    DBGMSG(@"%s", __func__);
    DBGMSG(@"segue identifier:%@", [segue identifier]);
}

Segueに"segue01"というidをつけたので、それがデバッグ出力されるはずだ。
ここで画面遷移となった原因に対応した状態をDocumentに保存する等すれば、遷移理由に対応した処理が出来るはずだ。

_ 関連情報

Converting to Storyboards Release Notes
Your Second iOS App: Storyboards
iOS Developer Libraryの情報です。

トップ «前の日記(2012-02-09) 最新 次の日記(2012-02-12)» 編集