20
20
const CGFloat NAMapViewAnnotationCalloutRightAccessoryLeftOffset = 2 .0f ;
21
21
const CGFloat NAMapViewAnnotationCalloutRightAccessoryTopOffset = 9 .0f ;
22
22
const CGFloat NAMapViewAnnotationCalloutAnchorYOffset = 26 .0f ;
23
- static NSString *NAMapViewAnnotationCalloutImageLeft = @" callout_left.png" ;
24
- static NSString *NAMapViewAnnotationCalloutImageRight = @" callout_right.png" ;
25
- static NSString *NAMapViewAnnotationCalloutImageAnchor = @" callout_anchor.png" ;
26
- static NSString *NAMapViewAnnotationCalloutImageBG = @" callout_bg.png" ;
23
+ static NSString *NAMapViewAnnotationCalloutImageLeft = @" / callout_left.png" ;
24
+ static NSString *NAMapViewAnnotationCalloutImageRight = @" / callout_right.png" ;
25
+ static NSString *NAMapViewAnnotationCalloutImageAnchor = @" / callout_anchor.png" ;
26
+ static NSString *NAMapViewAnnotationCalloutImageBG = @" / callout_bg.png" ;
27
27
28
28
@interface NAPinAnnotationCallOutView ()
29
29
@@ -32,11 +32,11 @@ @interface NAPinAnnotationCallOutView()
32
32
@property (nonatomic , strong ) UIImageView *calloutAnchorView;
33
33
@property (nonatomic , strong ) UIImageView *calloutLeftCenterView;
34
34
@property (nonatomic , strong ) UIImageView *calloutRightCenterView;
35
- @property (nonatomic , strong ) UILabel *subtitleLabel;
36
- @property (nonatomic , strong ) UILabel *titleLabel;
37
- @property (nonatomic , assign ) CGPoint point;
38
- @property (nonatomic , assign ) CGPoint position;
39
- @property (nonatomic , weak ) NAMapView *mapView;
35
+ @property (nonatomic , strong ) UILabel *subtitleLabel;
36
+ @property (nonatomic , strong ) UILabel *titleLabel;
37
+ @property (nonatomic , assign ) CGPoint point;
38
+ @property (nonatomic , assign ) CGPoint position;
39
+ @property (nonatomic , weak ) NAMapView *mapView;
40
40
41
41
- (void )positionView : (UIView *)view posX : (float )x ;
42
42
- (void )positionView : (UIView *)view posX : (float )x width : (float )width ;
@@ -49,10 +49,10 @@ - (id)initOnMapView:(NAMapView *)mapView
49
49
{
50
50
self = [super init ];
51
51
if (self) {
52
- UIImage *calloutBG = [[UIImage imageNamed: NAMapViewAnnotationCalloutImageBG] stretchableImageWithLeftCapWidth: 0 topCapHeight: 0 ];
53
- self.calloutLeftCapView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: NAMapViewAnnotationCalloutImageLeft]];
54
- self.calloutRightCapView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: NAMapViewAnnotationCalloutImageRight]];
55
- self.calloutAnchorView = [[UIImageView alloc ] initWithImage: [UIImage imageNamed: NAMapViewAnnotationCalloutImageAnchor]];
52
+ UIImage *calloutBG = [[UIImage imageWithContentsOfFile: [[[ NSBundle mainBundle ] bundlePath ] stringByAppendingString: NAMapViewAnnotationCalloutImageBG] ] stretchableImageWithLeftCapWidth: 0 topCapHeight: 0 ];
53
+ self.calloutLeftCapView = [[UIImageView alloc ] initWithImage: [UIImage imageWithContentsOfFile: [[[ NSBundle mainBundle ] bundlePath ] stringByAppendingString: NAMapViewAnnotationCalloutImageLeft] ]];
54
+ self.calloutRightCapView = [[UIImageView alloc ] initWithImage: [UIImage imageWithContentsOfFile: [[[ NSBundle mainBundle ] bundlePath ] stringByAppendingString: NAMapViewAnnotationCalloutImageRight] ]];
55
+ self.calloutAnchorView = [[UIImageView alloc ] initWithImage: [UIImage imageWithContentsOfFile: [[[ NSBundle mainBundle ] bundlePath ] stringByAppendingString: NAMapViewAnnotationCalloutImageAnchor] ]];
56
56
self.calloutLeftCenterView = [[UIImageView alloc ] initWithImage: calloutBG];
57
57
self.calloutRightCenterView = [[UIImageView alloc ] initWithImage: calloutBG];
58
58
self.subtitleLabel = [[UILabel alloc ] initWithFrame: CGRectZero ];
0 commit comments