How can i go from a mapview to a simple view
I am working on an app in which the starting point is a map and it has a button too. What i want is that if user clicks the button it will take him to another view which just have two or three buttons or other elements.
P开发者_StackOverflowlease provide me with detail answer so that i would be able to do it.
Thanks in advance, i would really appreciate it.
just put this code inside your button action and change it your needs
YourViewControler *yourViewControler = [[YourViewControler alloc] initWithNibName :@"YourViewControler" bundle:nil];
[self.navigationController pushViewController:yourViewControler animated:NO];
[yourViewControler release];
and you can add anything in YourViewControler.
I hope it will help you.
That could be achieved in a lot of ways. For example you could use a controller for each view you need and switch between them with the use of a UINavigationController. Use the map controller as the root of the navigation controller, then when the user presses the button just call pushViewController:animated:
精彩评论