現バージョンのXcodeで古いプロジェクトを開いたところ,StoryBoardに下記警告が出ていた。
MainStoryboard.storyboard: warning: Unsupported Configuration: Segues initiated directly from view controllers must have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]
問題の箇所は,ボタンとかからではなくView Controller(viewの下にあるアイコン)から直接次のビューへsegueをつないでいた箇所で,この場合はsegueにidentifierをつけろとのこと。
対処法は上記の通りで,該当segue(矢印)をクリックし,Attributes inspecterでこのsegueのidentifierを登録する。
ちなみにsegueに登録したidentifierは,画面遷移時に遷移元のView Controllerから遷移先のView Controllerに値を渡す処理とかでそのsegueを特定するのに使ったりする。
0 件のコメント:
コメントを投稿