Scroll/Position Image in Scrollview that is smaller than the Scrollview
Scroll/Position Image in Scrollview that is smaller than the Scrollview
- Subject: Scroll/Position Image in Scrollview that is smaller than the Scrollview
- From: email@hidden (Hado Hein)
- Date: Wed, 24 Nov 2010 12:04:26 +0100
- Organization: handmade !
I have a project where something like a 'put your face in someone elses
head' "game" is wanted.
So I did a UIScrollView in IB and in code I attach the UIImageView of
the picture. That works fine. With multitouch enabled zooming works
fine, so does positioning of the enlarged picture.
Then I''ve put a mask picture (a portrait with transparent face) with
user interaction off above that. This works fine for position/zoom the
face picture (which is drawn below the mask picture).
But when the picture is zoomed to a size smaller than the ScrollView the
picture is placed in the top left corner and no more scrolling happens.
I read the ScrollView HowTos google finds, but they all deal with how to
enlarge and center an enlarged ImageView.
What approach do I take for this task?
I tried severaly ways of repositioning the Image in viewDidEndZooming -
but none of my tries was successful.
In simple I want to center the small ImageView in the bigger ScrollView
so that there is still scrolling possible.
This might be a usual situation if the user has a portrait picture that
has to be zoomed to fit in the transparent (face) part of the mask
picture
Ongoing, just for having another option, is there an API to do the same
with camera?
thx,
--
Hado Hein (KSK, DTHG), Berlin
sip +49.30.91688488
www.beleuchtungsbildner.de - Stage Lighting Directing
www.batchmaker.de - Stage Lighting Design, Control and Routing
_______________________________________________
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