Reputation: 397
I have some images which are huge in size and my bundle size currently is 70 MB. I think Xcode already runs the assets through png crush.
Upvotes: 3
Views: 947
Reputation: 13234
UILabel
s instead.CAShapeLayer
s instead of using
images.In addition to images keep those in mind too:
Upvotes: 5
Reputation: 4985
One option is to host the images on a CDN like OpenText and fetch them as part of app initialization, or whenever they are first needed. Obviously this is more coding, but projects like SDWebImage make it pretty easy:
https://github.com/rs/SDWebImage/tree/master/SDWebImage
It also gives you the flexibility to swap out those images later if you use caching headers.
Upvotes: 0
Reputation: 536027
It seems very unlikely that you actually need huge images. After all, the screen is not huge. Thus, the most likely form of size reduction is to reduce the physical dimensions of the images to the size you are actually going to be displaying.
This saves bandwidth when the user downloads the image, reduces the size of the app on the user's hard disk (the device), and also saves memory at the time an image is loaded. It is a vast waste of RAM to load an image that is larger than the size at which it will be displayed; after all, remember, the memory involved rises exponentially with the square of the difference.
Upvotes: 0
Reputation: 1060
You can try converting the images to jpg (if they don't have any transparent regions). Also try using http://imageoptim.com/
Upvotes: 3