iOS - Change title for top bar in a viewcontroller that is connected to a cell in a view container

StackOverflow https://stackoverflow.com/questions/23552497

Question

So i have a main ViewController which is connected before to a navigator controller.

in my main view controller i have a ViewContainer and inside the container i have a table view (cells), now i want to connect each cell to a different View Controllers, and each of the view controllers to have a different title!!

when i make a (push) connection between a cell and a view controller, the view controller gets the title of my main view controller which contain the view container which contain the cell!!

please help, how to change the top bar title??

thank you very much.

Was it helpful?

Solution

UIViewControllers have a title property that you can edit. Add something like this:

[self setTitle:@"WhateverTitle"];

to the viewDidLoad method of your new UIViewController.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top