views:

38

answers:

2

I would like to be able to add UIImageViews to my screen and also be able to re-size them, rotate them etc during run-time.

How are the images resized, rotated etc.? Is openGl needed for this?

thanks

+1  A: 

You can use view .transform property to get scaling and rotation ( CGAffineTransform ) or you could go lower and use view layer and CoreAnimation power for more advanced effects.

Cheers, Krzysztof Zabłocki

Krzysztof Zabłocki
+1  A: 

Hello

About resizing you can use the frame property of the UIImageView

About rotating, you should try applying a transform to the UIImageView like :

yourView.transform = CGAffineTransformMakeRotation(45.0*M_PI/180.0);

Good Luck !

Vinzius
Thanks, I want to be able to resize using buttons on the edges of the image, how does one detect the touch for dragging and resizing motions?
alJaree
If you want buttons on the edge of the image, maybe the better way is to subclass the UIImageView to detect touches inside (touchesBegan, touchesMoved, ...). About resizing motions, it can be done with an UIView Animation (check google about it ;))
Vinzius
Thanks, I will try that. Is there no built in methods for this, e.g. resizing the view when working in IB, the same functionality in app at run time.
alJaree
I don't know well IB but I thing you won't be able to do cool things just with IB ^^
Vinzius
That isnt what I meant :) but thanks for the advice, I found some info on gestures.
alJaree