2013-06-01 2 views
1

내 코드와 함께 왼쪽 버튼 :는 MKPinAnnotationView는 이미지 여기

 UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; 
     UIButton* leftButton = [UIButton buttonWithType:UIButtonTypeInfoLight]; 

     [rightButton setTitle:[(myLocation*)annotation url] forState:UIControlStateApplication]; 
     [rightButton addTarget:self 
         action:@selector(showDetails:) 
       forControlEvents:UIControlEventTouchUpInside]; 
     customPinView.rightCalloutAccessoryView = rightButton; 

     [leftButton setTitle:annotation.title forState:UIControlStateNormal]; 
     customPinView.leftCalloutAccessoryView = leftButton; 

의미가 있습니다,하지만 왼쪽 버튼 프랑수아 원에 내가 같이 나타납니다. 길을 얻을 수있는 가능성을 나타내는 녹색 자동차를 원합니다. 어떻게해야합니까?

미리 감사드립니다.

답변

3

그런 경우 맞춤 검색 버튼을 만들어야합니다.

UIButton * leftButton = [UIButton buttonWithType:UIButtonTypeCustom]; 
[leftButton setTitle:annotation.title forState:UIControlStateNormal]; 
[leftButton setBackgroundImage:[UIImage imageNamed:@"CAR_IMAGE.PNG"] forState:UIControlStateNormal]; 
customPinView.leftCalloutAccessoryView = leftButton; 
+0

감사합니다. @apurv, 시도하겠습니다. – ghiboz