In my project, i have to drop a pin (Annotation) on any touchable location in the map view by tapping that location and then add some text to the annotation. Is it possible to do so? If yes please describe..
A:
Please review the Map Kit documentation and sample code. You should get familiar with the basic concepts in the SDK. Stack Overflow is an amazing community ready to help with specific problems but not really here to do your coding for you.
You should review this method:
- (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view
as well as the standard ways of getting touch events for UIViews and the UIResponder superclass in general. This might be a good place to focus on:
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
Finally work on understanding of how to add annotations which is extensively documented and demonstrated in sample code. Infact there's a whole great section 'Annotating Maps' in here:
Nick
2010-08-30 18:14:44