質問失礼します。
スクロールビュー内にあるコンテナビューに配置したボタンを押下した際、
アラートの確認後にトップ画面へ戻りたいのですが、
ストーリーボードでコンテナビューからトップ画面へセグエを接続しても、トップ画面へは遷移しませんでした。
トップ画面にstoryboardIDを設定し、コードを記載して画面遷移させる事は出来たのですが、
そうすると画面遷移時にナビゲーションバーが消えてしまいます。
どうすればナビゲーションバーを消さずにコンテナビュー内部のボタン押下でトップ画面へ遷移する様に出来るでしょうか。
どなたかご教授よろしくお願い致します。
swift
1//保存の確認アラートを表示してトップ画面に戻る 2let aleat :UIAlertController = UIAlertController(title: nil, message: "登録しました", preferredStyle: .alert) 3let action:UIAlertAction = UIAlertAction(title: "OK", style: .default, handler: {(action: UIAlertAction!) in 4let secondViewController = self.storyboard?.instantiateViewController(withIdentifier: "SecondViewController") as! ViewController 5self.present(secondViewController, animated: true, completion: nil)}) 6aleat.addAction(action) 7 present(aleat, animated: true, completion: nil)
回答1件
あなたの回答
tips
プレビュー