Question

iPad application:
I have a one screen called profile screen which is showing my information and on the same screen at the bottom I am showing list of persons (only name and photo). I can click on any of the person photo and it shows me the same profile screen with selected person information. From there I can further go to the details of another person and so on. And this can go to any hierarchy (Similar to facebook connections). I am using storyboard.

My problem is:
1. How to navigate/call to same screen with different profile information?
2. Back button on the navigation bar should take me back to the previous profile from where I came.

Was it helpful?

Solution

If the back button is going to take you back to the previous profile that you were just viewing, you should just create a new controller of the current type, set the data to the next user, and push it to the nav controller.

MyViewController *vc = [[MyViewController alloc] initWithNibName:@"MyViewController"];
vc.personDetails = details;
[self.navigationController pushViewController:vc animated:YES];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top