1
votes

enter image description here

I have an InvoiceVC in the second tab bar ( tab Bar index : 1 ) like the picture above. if the table view cell is tapped, I need to segue to the InvoiceDetailVC like the picture below

enter image description here

as you can see in the InvoiceDetailVC, there is no tab bar in the bottom of the InvoiceDetailVC, I mean that tab that has red badge in the bottom. I need remove that tab bar.

I have tried to use present modally instead of push show segue. But the problem is, there is no back button to back to InvoiceVC

so what should I do ?

enter image description here

1
In your destination controller attribute inspector check the box hide bottom bar on push.Francesco Deliro

1 Answers

2
votes

Use in prepareforsegue while pushing and set hidesBottomBarWhenPushed to true to hide the tabbar on destination view controller.

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if (segue.identifier == "InvoiceVC") {
        let indexPath: IndexPath? = tableView.indexPathForSelectedRow
        let destViewController = segue.destination as? InvoiceVC
        destViewController?.recipeName = recipes[indexPath?.row ?? 0]
        destViewController?.hidesBottomBarWhenPushed = true
    }
}