objective c - Resize UIImage/UIImageView without keeping aspect ratio -



objective c - Resize UIImage/UIImageView without keeping aspect ratio -

i have uiimageview i've added pinchgesturerecognizer to. currently, image resized nicely when pinching, want able resize image without maintaining aspect ratio. if user pinches horizontally, image view's width enlarge; if pinch vertically, height enlarge , forth.

can give me hint on how please?

write custom gesture recognizer requires 2 fingers on screen. 1 time both fingers on screen store offset imageview's border in uiedgeinsets.

in touchesmoved, check if both fingers onscreen: if so, calculate new frame applying edgeinsets in current touch position.

header: click implementation: click

works , feels more natural other implementations i've seen.

objective-c ios5 uiimageview uiimage

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -