したがって、次のようにクラス X を作成しました。
@interface X : NSObject <MKAnnotation> {
CLLocationCoordinate2D coordinate;
NSString * title;
NSString * subtitle;
UIImage * image;
NSInteger * tag;
}
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * subtitle;
@property (nonatomic, retain) UIImage * image;
@property (nonatomic, readwrite) NSInteger * tag;
@end
内部:
- (void) mapView: (MKMapView *) mapView annotationView:(MKAnnotationView *) ビュー calloutAccessoryControlTapped:(UIControl *) コントロール
X が持つタグ プロパティにアクセスできるようにしたいと考えています。これはどのように可能ですか?【制御タグ】はできますか?これはどのように機能すると思われますか?