Tam Van Duc
Tam Van Duc

Reputation: 27

Back button not showing when pushing viewcontroller

When I click on a tableview item I would like to push a new viewcontroller. This works fine but the only thing is that my back navigation button is not showing up in the new pushed view controller.

When I click on the top left i navigates back, the back button is just not displaying..

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let chosennewitem = self.newsItems[indexPath.row]
        for item in self.entities {
            if(item.appname!.lowercased() == chosennewitem.title!.lowercased()){
                self.chosenItem = item
                let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
                let detailview = storyBoard.instantiateViewController(withIdentifier: "detailview") as! ApplicationDetailViewController
                detailview.app = chosenItem
                detailview.modalPresentationStyle = .fullScreen
                self.navigationController?.pushViewController(detailview, animated: true)
            }else{
                print("not found")
            }
        }
    }

Upvotes: 1

Views: 590

Answers (1)

Kudos
Kudos

Reputation: 1500

Please Change tintcolor of Navigationbar. It will work.

Reason: Your Button title color and Tintcolor are of same color.

Upvotes: 1

Related Questions