简体   繁体   中英

UIAlertController removes tabbar on segue

I have an alertController :

let alertController = UIAlertController(title: "Success", message: "Your book has been uploaded", preferredStyle: .alert)
let PostBook = UIAlertAction(title: "OK", style: .cancel, handler: { action in self.performSegue(withIdentifier: "PostBook", sender: nil)})

alertController.addAction(PostBook)
self.present(alertController, animated: true, completion: nil)

print("Posted to Firebase. ")

In the UIAlertAction , I have an action to segue, and every time I segue, it whites out the tab bar. The tab bar is still there, it justs whites it out, which I don't want. The segue is a show segue.

before segue: 在此处输入图片说明

after segue: 在此处输入图片说明

Embed in a navigationController to your view so that all the segues goes through the navigationController instead.

在此处输入图片说明

Second view controller:
在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM