views:

25

answers:

2

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.

Please provide me with detail answer so that i would be able to do it.

Thanks in advance, i would really appreciate it.

A: 

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:

IlDan
Conceptually i got your point but how to implement it?If you have any link or any example to show which describes how to implement this thing.Thanks for your response, I appreciate it.
Ashutosh
A: 

Hi its so easy, 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.

Sivanathan