BMXLocationAttachment Class Reference
Inherits from BMXMessageAttachment :
NSObject
Declared in BMXLocationAttachment.h
Properties
address
地址
@property (nonatomic, copy) NSString *address
Discussion
地址
Declared In
BMXLocationAttachment.h
latitude
@property (nonatomic) double latitude
longitude
@property (nonatomic) double longitude
Instance Methods
initWithLatitude:longitude:address:
初始化BMXLocationAttachment
- (instancetype)initWithLatitude:(double)*aLatitude* longitude:(double)*aLongitude* address:(NSString *)*aAddress*
Parameters
aLatitude
纬度
aLongitude
经度
aAddress
地址
Return Value
BMXLocationAttachment
Discussion
初始化BMXLocationAttachment
Declared In
BMXLocationAttachment.h
Example:
messageModel.content = [NSString stringWithFormat:@" %d s",duartion];
break;
}
case MessageBodyType_Location: {
NSDictionary *locationInfo = (NSDictionary *)content;
double latitude = [locationInfo[@"latitude"] doubleValue];
double longitude = [locationInfo[@"longitude"] doubleValue];
NSString *address = locationInfo[@"address"];
BMXLocationAttachment *locationment = [[BMXLocationAttachment alloc] initWithLatitude:latitude longitude:longitude address:address];