Keeping UIScrollView content centered
Keeping UIScrollView content centered
- Subject: Keeping UIScrollView content centered
- From: Rick Mann <email@hidden>
- Date: Fri, 14 Jun 2013 15:11:59 -0700
As I'm experimenting with how to implement pinch and rotate gestures in a UIScrolLView, I set up a non-autolayout (traditional) pinch-zooming UIScrollView with a UIImageView inside it.
I followed the instructions here:
http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/UIScrollView_pg/ZoomZoom/ZoomZoom.html
And looked at the TapToZoom example. This mostly works, but if I zoom way out, so that my image (which has an aspect ratio that doesn't match the screen) is completely visible, it's not centered in the view; it's pinned to the upper-left.
The Photos app seems to nicely keep the image centered. What's the right way to do this?
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden