I am currently getting images from the 'Documents' directory (using -imageWithContentsOfFile:) with no problems except that I cannot get the images to display immediately (for example as soon as touchesEnded was called). I am assuming that this has to do with image caching and that image objects created in the above way are not cached? So, I figure, I will cache the image object after creating it and then use the cached image using -imageNamed:. So how can I save a UIImage object to the application's Bundle and/or Cache it?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- SwiftUI: UIImage (QRCode) does not load after call
- how do you prevent page scroll in textarea on mobi
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Is there a google API to read cached content? [clo
- Custom Marker performance iOS, crash with result “
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
You can't modify the application bundle once it's on the iPhone. The entire thing is code signed, and changing it would cause it to not run any more.
Why don't you pre-load the images you need at startup? Be careful, though, as large images take up a lot of memory, and the kernel could kill your app if it goes overboard.