Creating and Resizing a UIImageView
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
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 !
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
精彩评论