Seriously, is this how IKImageView zooming is *supposed* to be?

<http://www.not-pc.com/IKImageViewZooming.mov> (13MB)

That's an absolute train wreck.

Shirley, I *must* be missing some call to make this do the right thing. Any pointers as to what that might be will be greatly appreciated.

As you can see from the video, I have a slider tied to the zoomFactor of the IKImageView, and simply set the zoomFactor property of the view to the value of the slider (scaled appropriately) and redisplay it.

The displacement during the zoom and the subsequent displacement back to the origin despite any previous translation (panning) leads me to believe I'm supposed to be dynamically resizing the image view bounds (frame?) while zooming, and that belief floors me.

In my mind, what *should* happen is: Zooming happens from the center of the view bounds (the dark gray area), and the translation (panning) is left in place during the zoom. Am I way out in left field on this?

Please tell me I'm missing something (in the not-so-hot documentation).

Also, currently (as you can see from the last several seconds of the video), you can drag the image bounds half-way across the view area; is there a way to pin it so that, say, the left side of the image can't go further than the left side of the view bounds? (This is relevant only for when the image zoom factor makes it display larger than the view area itself, of course.) And similarly, disallow dragging the right edge of the image past the right edge of the view when the image is smaller than the view bounds, but I know I'm probably reaching too far here.


Thanks!
randy
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to