views:

585

answers:

2

Apple says, that all I have to do is to modify the bounds rectangle. Then the content inside the bounds rectangle would be stretched or jard into the frame rectangle.

But when I assign another CGRect with a smaller width to my bounds rectangle, nothing happens. The UIImageView keeps looking exactly the same. No compile errors. I guess that's not the way to go...

how do you do that?

A: 

If you're using a uiview, you need to send beginAnimations:context: to uiview (http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW14)

EDIT: Try applying a CGAffineTransform to the view. I think the function is CGAffineTransformMakeScale(). You'll have to double check the docs.

Alex
well, I don't want to animate it :)
Thanks
A: 

changing the frame will stretch or compress an image. If it doesn't, I suspect you have a bug and we need to see your code to help further.

If you want to scale the image see this question.

Roger Nolan