views:

68

answers:

1

Is it possible to have an image as a constant in Objective C for iPhone development?

+1  A: 

Image can't be a constant, however using [UIImage imageNamed:@"image file name"] is using cache so after the first call, this should be very efficient. However it will take app memory for that, so it use carefully.

Guy Ephraim
When will this cached image be release ?
Toro
it will not, if you need to release it you should manage it yourself.look at this question: http://stackoverflow.com/questions/316236/uiimage-imagenamed-vs-uiimage-imagewithdata
Guy Ephraim