I have a small IPhone app that I am working on and I am displaying an image with a UIImageView. I am scaling it up using the Aspect Fit mode. I would like to have the imag
imageView.layer.magnificationFilter = kCAFilterNearest
imageView.layer.shouldRasterize = true
You would need to set the magnificationFilter property on the view's layer to the nearest neighbour filter:
[[view layer] setMagnificationFilter:kCAFilterNearest]
There are two ways you could do this. You can either implement a rescaling algrorithm without interpolation. If this is to much work you could rescale the image in another application like gimp or photoshop. This would work unless you needed to change the size dynamically in your application.
Make sure you include the line
#import <QuartzCore/CALayer.h>
At the top of the file containing the call to setMagnificationFilter or it won't compile.