On May 11, 2016, at 13:56 , Carl Hoefs <newsli...@autonomy.caltech.edu> wrote: > > I just tried UIScrollView & -setZoomScale:. No effect.
I think you’re flailing now. ;) > I was hoping there was a way to initially programmatically pinch the view > down by 10%, so the view's frame isn't reduced as well You can’t make a view smaller without making it … smaller. Perhaps you’re not distinguishing the frame from the bounds? If you apply a 10% reduction to a 100 x 100 view via a transform, its frame will be 90 x 90, but its bounds will still be 100 x 100. > Would it help if I changed my UIView to be a UIScrollView instead? Well, you wouldn’t change your custom UIView to *be* a UIScrollView, but you might place your custom UIView *inside* a UIScrollView. Setting the zoomScale on a scroll view changes the transform on the content subviews, not on the scroll view itself. But wouldn’t you have a zoomable custom view inside a scroll view anyway? How else do you plan for the user to pan around when it’s zoomed in? > I was hoping there was a way to initially programmatically pinch the view > down by 10% You could, I suppose, scale your content drawing, rather than scaling the view. In that case, you’d need to put the pinch gesture recognizer on your view, save the calculated scale factor every time the recognizer changes state, and redraw your view in drawRect: using the saved scale. But that’s the functionality that UIScrollView is generally designed to provide for you. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com