prepareForSegue: is not called after tapping a row in UITableView - ios

I have a UITableview, which has a list of cars. On selecting any row, a UIViewcontroller is to be shown, showing the details of the car selected.
However, prepareForSegue: is not getting called when I tap on any row in the Search Table View Controller.
After searching on the internet, I looked at a few examples and I tried to follow them to do this job, using [self performSegueWithIdentifier:#"ShowProductDetail" sender:nil];
in my didSelectRowAtIndexPath: method. It performed the job, but now I don't see a BACK button. I need the BACK button in the navigation bar in the new view controller, which is the selected one in the image:

I was just missing my cellIdentifier for the prototype cell.

Related

reload collection view by press back bar button item

I have a collectionView in my app that when the user taps one cell of it, the collectionView will reload data, in detail, I have an album that it could contain another album when user choose one of them it shows albums inside of that.
Now I want when user click on backBarButton the past data appears on collectionView (super-albums), but now backbarButton shows the past VC.
I use navigationController and show module segues between VCs.
Q: How should I implement that?
If your changing view on collection cell press. you can reload the collection view on viewWillAppear.

TableView with detailed view

I little confused with configuring detailed view with MMDrawerController and without navigation controller.
I have TableView with custom cells inside ViewController. When users presses cell i want to show another ViewController with details about selected item. For this case i use didSelectRowAtIndexPath method from my tableview.
There are many cells in my table, that is why when user presses "back" button on detailed view i want to navigate to selected cell not to the top of table. What types of segues i should use?

Call segue with Disclousure indicator won't work

My question is very similar to this:
Disclosure Indicator doesn't call seque while Detail Disclosure does
But is a bit different.
The same is happening to me. I have a dynamic table view which loads some rows at viewLoad.
So I set the segue from the Cell to a new View which will show some details of the item. I also set the Segue to Push.
When I do that, the Cell automatically sets its Accessory to Detail Indicator (So the blue info button appears) This works fine, I click on the info button and it loads the new view. But I do not want that, I want the Cell to have a Disclousure indicator (the arrow) and whenever you click on the entire row, just Push the new view. I did this on an Static Table View and it worked fine, but I can't make it work with a Dynamic Table. Nothing happens when I click, just the animation of the tap and nothing else.
No, it's not ok to change an accessory action segue to a selection one by setting the accessory to none -- that doesn't change the segue type. The fact that you got the blue button when you made the segue means you chose an "Accessory Action" segue. When you drag from the cell to the next controller and let go, you get a menu of choices that's divided into two sections. The top ones are Selection segues, and the bottom set are Accessory Action segues. You need to delete your segue and remake it, being sure to choose from the Selection segue choices.

How to make pressing a selected tab bar item reload my view

I have a view contained in a tabbarcontroller. When a user clicks on one of the items I load data into that view. However, if they click that item again I want to reload the view again.
So far I am running the didSelectViewController method in my tabbarcontroller and from there I popToRootViewControllerAnimated. However it appears that popToRootViewControllerAnimated doesn't execute the viewdidload, viewwillload, or viewwillappear methods, so I am stuck as to how to reload...
While it may not be UI friendly to refresh an already selected tabbar item (user already selected that item and it shows it as selected. They would then expect to pull down to refresh), have you tried adding [viewController.view setNeedsDisplay]; in your didSelectViewController?

iOS - Push Segue not working even with NavController

I'm trying to set up a basic "Newsfeed" function for an iOS app, with headlines in a TableViewController segueing into a simple ViewController to display the text of the selected story. I'm using Storyboards to set up the segues, and I can't get it to work...
What I've Done - I started by CTRL+Dragging from the Cell of the TableView onto the secondary ViewController and choosing "Selection Segue - Push." Then I clicked on the segue and gave it the identifier "newsArticleSegue," and I embedded the TableView in a Navigation Controller. I've got the TableView data source hooked up to a plist file as well, although I don't think that would have any effect on the segue, right?
All that happens when I run the app and click on a row of the TableView is that it gets highlighted blue. Clearly the segue isn't working, but the tutorials I've found only list those steps, as though that's all that's needed...
Can anyone tell me what I am missing? And thank you in advance!
When you create the segue with IB, you can drag from the view controller (which you did) or from the table view cell, which will call the segue if the table view cell is selected.

Resources