views:

28

answers:

0

Hello,

Does anybody know how to transform a UIBarButtonItem ?

I tried this but with no results :( It's not working on both UIBarButtonItem and its customview.

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:5.0f];
CGAffineTransform myTransform = CGAffineTransformMakeRotation(M_PI_2);
UIBarButtonItem * currentItem =  [self.toolbarItems objectAtIndex:4];
currentItem.customView.transform = myTransform;
[UIView commitAnimations];

I confirm the transform works on other views (I tried with self.view).

Thanks !