-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackageLocation.m
More file actions
38 lines (30 loc) · 770 Bytes
/
PackageLocation.m
File metadata and controls
38 lines (30 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// PackageLocation.m
// Project Acorn
//
// Created by James Crowson on 25/09/2012.
// Copyright (c) 2012 James Crowson. All rights reserved.
//
#import "PackageLocation.h"
@implementation PackageLocation
@synthesize name = _name;
@synthesize address = _address;
@synthesize coordinate = _coordinate;
- (id)initWithName:(NSString*)name address:(NSString*)address coordinate:(CLLocationCoordinate2D)coordinate {
if ((self = [super init])) {
_name = [name copy];
_address = [address copy];
_coordinate = coordinate;
}
return self;
}
- (NSString *)title {
if ([_name isKindOfClass:[NSNull class]])
return @"Unknown charge";
else
return _name;
}
- (NSString *)subtitle {
return _address;
}
@end