views:

204

answers:

2

Hey all,

my problem is that i want to rotate the uiimageview of a uibutton. The transformation itself is pretty easy:

super.imageView.transform = CGAffineTransformMakeRotation((M_PI*120)/180);

(I subclass a button, but it doesn't work with a normal button either.) So, it rotates but looks not very pretty: http://img534.imageshack.us/img534/2796/afterh.png

As reference, this is the same imageView but not rotated: http:// img704.imageshack.us/img704/1299/beforen.png (sorry for that whitespace, i'm new and can just post one link...)

Thanks for your help

Sebastian

A: 

http://img251.imageshack.us/img251/1057/aftera.png

I'm sorry, this is the "right" weird picture. The one before is with an

super.imageView.contentMode = UIViewContentModeTop;

Sebastian

antihero
A: 

Okay, i finally got it.

It was needed to set the clipsToBounds property of the imageView to NO.

Sebstian

antihero