Use a View controller multiple times in navigation controller in iOS
I am new in iOS, I am creating a app much like twitter, I am using Storyboard for it. In this app i have a View controller class which shows the user Detail and their feeds like received messages, On click on message user can see message sender profile detail on another View controller i am using navigation controller push segue to go from user profile to message sender profile.
I want to Open further message sender profile on second View Controller on click of message
Like from A -> B -> C -> D -> E and so on.., same as like Facebook or twitter so that the go back order is also same in navigation controller.
The navigation controller works as a stack, it is automatically adjusted to work the way you need.
Add navigation controllers like this:
UIViewController *bbp=[[UIViewController alloc]initWithNibName:@"UIViewController" bundle:nil]; UINavigationController *passcodeNavigationController = [[UINavigationController alloc] initWithRootViewController:bbp]; [self.navigationController pushViewController:passcodeNavigationController animated:YES]; [passcodeNavigationController release];
Go through apple docs to get a clear idea: https://developer.apple.com/library/ios/documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html