juelizabeth
juelizabeth

Reputation: 505

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: enter image description here

after segue:enter image description here

Upvotes: 0

Views: 104

Answers (1)

Rashwan L
Rashwan L

Reputation: 38833

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

enter image description here

Second view controller:
enter image description here

Upvotes: 1

Related Questions