Q:

Rotate a UIButton that I pulled from a NSArray

I am trying to apply a transformation to a Button that I have pulled from a Array:
buttonArray[y].transform=CGAffineTransformMakeRotation(M_PI);

but it doesn't like this... Is there a different way for me to do the same?

A:

I figured it out:
CGAffineTransform rotate = CGAffineTransformMakeRotation(1.0);
[[buttonArray[y] layer] setAffineTransform:rotate];

