I have a question for you about iPhone programming. I am building an app where I show the closest specialty restaurants to the user. I am using a navigation based application to do the development.
I want to let the user press a button on the first screen that allows him/her to go to screen 2.
From screen 2, here the user will see a table of all the restaurants close to the user.
Once the user selects a restaurant from this table, the user is taken to a third screen
Here, the user will see a map where the user will see where he/she is, and where the restaurant is located.
I will be using the CoreLocation framework to initially calculate the user's location, and then use this to search the database for locations close by. What I am confused about is, what method should I be doing this in the RootViewController? Would I place the button in the viewDidLoad() method, which would then trigger the
-(void)locationManager: (CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
method? Does this make sense?
Any suggestions?
Thanks in advance to all who reply.