iphone - How to select an annotaion and pass an id to specific detail page? -
I added bpid as a string in myannotation class custom and the rest is:
- (Zero) MapView: (MKMapView *) mapView AnnotationView: (MKAnnotationView *) View CalloutAutomatic Control: (UIControl *) Control {DLog (@ "calloutAccessoryControlTapped"); Open the page in /// Detail, but do not look for Bee MyNnnotation * myAnnot = (MyNnotation *) BeepsDetail * objCont = [[BeepsDetail alloc] initWithNibName: @ "Bipsditter" bundle: zero]; ObjCont.mId = myAnnot.beepid; ObjCont.modalTransitionStyle = UimodalTransitionStyleFlipHorizontal; [Self current model view controller: objCont animated: yes]; // [Paramodic Set Value: [MOBJECTMDIC ObjectForcae: @biped]] for: @ "Bipid"]; [ObjCont release];
line
NSMutableDictionary * dic = [ PlaceName ObjectIntextX: MKNotationview Encryption]; returns an error because MKAnnotationView is class and there is no annotation method in the class View MKAnnotationView was selected since view.notation will be used. In addition, annotion is misspelled. However, it still will not work because view.annotation is an annotation object and the integer is not in the index your placeName array. You say that you are clicking on the "right arrow" which indicates the correct callout assistant button in the callout (and not the annotation itself). In that case, you should find the selection by using the delegate method instead of calloutAccessoryControlTapped instead of didSelectNannotationView . In both cases, you will first be able to access the entry using the annotation object by using view.annotation and then using some property (possibly custom) of the annotation object, determine the detailed data. For example, if you have made a custom MK annotation class (instead of using the MKPoint Annotation ), you can add it to beepId property When setting it, it creates annotations and can retrieve it in the delegate method like this: My annotation class * myAnnot = (MyNnotationClass *) view.notation; ObjCont.mId = myAnnot.beepid;
Comments
Post a Comment