码迷,mamicode.com
首页 > 其他好文 > 详细

自定义大头针

时间:2016-05-06 09:20:19      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:

#import <MapKit/MapKit.h>

 

@interface MyPointAnnotation : MKPointAnnotation

 

//大头针信息

@property (nonatomic,copy) NSString *information;

 //构造方法

- (id)initWithCoorDinate:(CLLocationCoordinate2D)coordinate title:(NSString *)title subTitle:(NSString *)subTitle information:(NSString *)information;

 

@end

 

//大头针初始化

#import "MyPointAnnotation.h"

 

@implementation MyPointAnnotation

 

- (id)initWithCoorDinate:(CLLocationCoordinate2D)coordinate title:(NSString *)title subTitle:(NSString *)subTitle information:(NSString *)information {

    

    if (self = [super init]) {

        //标题

        self.title = title;

        //子标题

        self.subtitle = subTitle;

        //坐标

        self.coordinate = coordinate;

        //信息

        self.information = information;

    }

    return self;

}

@end

 

自定义大头针

标签:

原文地址:http://www.cnblogs.com/mzy123mzy/p/5464097.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!