The cocoawithlove site has some very informative articles. The link that you posted addresses zooming and also scaling while rotating the image in tandem with the screen (i.e. at a 45 degree turn the image diagonal has been sized to the screen width). It looks very slick. Handling rotation wasn't part of your original post. Your original post addressed making images go to full screen if not full screen, and reduce to original size if full screen. The cocoawithlove link does this nicely, (as does mine, without the cool rotation and no eyecandy, but I was only trying to demonstrate function not form) but if you have run the code, you can see that the image "fills" the screen with a border. Running the project with different aspect ratio images results in different borders. None of them completely fill the screen. In the cocoawithlove example, even if the image was proportional to the screen (320 x 460), by design he has a black border around the image.
Regarding having images not necessarily being centered, you simply need to store a CGPoint with the original location (either the origin or center) and when doing the CGAffineTransform exiting full screen, set the image's location at that point.
Bob
Last edited by thepianoguy; April 16th, 2011 at 07:09 AM..
Reason: typo
|