objective c - Is there anyway to load a bunch of images from Resources? -
hey guys, im getting little problem here. getting level 1 warning debug. so, think best solution loading every images of resource, prevent crash app doing.
so, whats best way it?
thanks!
there several strategies reduce memory usage if you're working lots of images. warning you're getting doesn't mean main memory running out, running low on video ram.
- reduce image size before adding them project, both scaling them down and/or compressing image data.
- load images need @ particular time - avoid trying keep images in memory.
- load images using (uiimage)imagewithcontentsoffile: rather (uiimage)imagenamed: (the latter reads caches images immediately, former more "lazy").
- be aggressive in 'release'ing images - don't wait autorelease kick in, send [image release];
- simplify other aspects of code use video ram (e.g. remove layer transparency, remove views aren't visible, etc.)
Comments
Post a Comment