neilang / NAMapKit

Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework
MIT License
263 stars 52 forks source link

"ImageIO_PNG_Data"'s count always increase after wake up from background #34

Closed jinsongK closed 10 years ago

jinsongK commented 10 years ago

step1.i jump to the "Pin Annotations Demo" view then exit to the home view. step2.click home button,demo will go to the background.then double-click home button,select demo app,and Repeat the previous operation

jinsongK commented 10 years ago

step1: step1 step2: step2

dblock commented 10 years ago

This is because we use imageNamed, see this SO question. Generally, these images should just be loaded via imageWithContentsOfFile, eg:

    NSString *australia = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Maps/australia.png"];
    [mapView displayMap:[UIImage imageWithContentsOfFile:australia]];

I'll change this.

dblock commented 10 years ago

Fix on HEAD, let me know if you find something else.