Somaiyah Sultani
Somaiyah Sultani

Reputation: 31

IOS Button on a TableView-Navigation bar not working

I am new to ios developing. I'm trying to put a back button on a UINavigationBar which I added to the top of a TableViewController and all I want to do is to dismiss the viewcontroller and go back to the previous one. the segue between the two viewController is modally and I had done the same thing on the other ViewControllers that are not UITableView and they work perfectly so I feel it is because of the UINavigationBar or the UITableViewController.

I really appreciate any help in advance.

Upvotes: 0

Views: 228

Answers (1)

iAnurag
iAnurag

Reputation: 9356

As far as I understand your question, you are presenting a view modally and trying to go back using navigation. Thats not gonna happen. See this explanation

Push Segue

It adds a new VC to navigationController. if we have requirement to manage our views in heiraricall manner we should use it. it adds new view to navigation stack . Back button is displayed . on clicking back button it popped the VC from navigationController.

Modal Segue

A modal segue is just one VC presenting another VC modally. No navigation stack created. Don't display back button . You have to create as when needed cusotmly.

Upvotes: 1

Related Questions