Skip to content

Commit ce7ed07

Browse files
JoeShidblock
authored andcommitted
Fix: NAPinAnnotationView pin image loading.
Closes #59 and #52.
1 parent 914e36a commit ce7ed07

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
#### [3.2.1](https://github.com/neilang/NAMapKit/tree/v3.2.1) (4/7/2016)
3+
4+
* [#59](https://github.com/neiland/NAMapKit/issues/59), [#52](https://github.com/neiland/NAMapKit/issues/52) - Fix: `NAPinAnnotationView` pin images fail to load - [@joeshi](https://github.com/joeshi).
5+
16
#### [3.2.0](https://github.com/neilang/NAMapKit/tree/v3.2.0) (12/20/2015)
27

38
* [#46](https://github.com/neilang/NAMapKit/pull/46) - Changed to new push pin style - [@neilang](https://github.com/neilang).

NAMapKit/NAPinAnnotationView.m

+3-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ - (void)setAnimating:(BOOL)animating
5050
if (animating) {
5151
pinImageName = [NSString stringWithFormat:@"%@_floating", pinImageName];
5252
}
53-
54-
pinImageName = [NSString stringWithFormat:@"/%@.png", pinImageName];
55-
56-
UIImage *pinImage = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] bundlePath] stringByAppendingString:pinImageName]];
53+
54+
UIImage *pinImage = [UIImage imageWithContentsOfFile:[[NSBundle bundleForClass:NAPinAnnotationView.class] pathForResource:pinImageName ofType:@"png"]];
55+
5756
[self setImage:pinImage forState:UIControlStateNormal];
5857
}
5958

0 commit comments

Comments
 (0)