I have application that shows objects on map for iPhone and iPad.
My problem is how to connect those objects with description from sqlite database in order to go from Map when I click on info for pin to page with description and everything else.
i manage to add button:
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton setTitle:annotation.title forState:UIControlStateNormal];
[rightButton addTarget:self
action:@selector(showDetails:)
forControlEvents:UIControlEventTouchUpInside];
annView.rightCalloutAccessoryView = rightButton;
I also added in viewDid load alloc and init for that view controller:
self.details = [[[RestaurantDetails alloc]init]autorelease];
But now when I press button on annotation it only shows me blank screen.
Can someone tell me how to pull data from sqlite database to show it on screen. I need logic of that process. 🙂
Thanks.
you have to create custom annotation view and before that you have to read data from database. and in custom annotation view, you can show that data.
Just google for custom annotation view and you will get it done.
For Sqlite database you can refer this.