ios - How do I display an arrow for MKPinAnnotationView.rightCalloutAccessoryView, like in Apple Maps? -


do initialize button image similar or there default values can use?

enter image description here

mkpinannotationview *newannotation = [[mkpinannotationview alloc] initwithannotation:annotation reuseidentifier:@"pinlocation"]; newannotation.animatesdrop = yes; newannotation.canshowcallout = yes; newannotation.rightcalloutaccessoryview = [uibutton buttonwithtype:uibuttontypedetaildisclosure]; 

you can show disclosure button following code:

- (mkannotationview *) mapview:(mkmapview *)mapview viewforannotation:(id <mkannotation>) annotation {        mkpinannotationview *newannotation = [[mkpinannotationview alloc]     initwithannotation:annotation reuseidentifier:@"pinlocation"];      newannotation.canshowcallout = yes;     newannotation.rightcalloutaccessoryview = [uibutton buttonwithtype:uibuttontypedetaildisclosure];   //for custom button  uiimage *btnimage = [uiimage imagenamed:@"arrow.png"]; uibutton *btn = [uibutton buttonwithtype:uibuttontypecustom]; [btn setimage:btnimage forstate:uicontrolstatenormal];    newannotation.rightcalloutaccessoryview = btn;  //try custom image on callout accessory view    newannotation.rightcalloutaccessoryview = [[uiimageview alloc] initwithimage:[uiimage imagenamed:@"arrow.png"]];      return newannotation; } 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -