有没有人知道如何转换UIBarButtonItem?
我尝试过以下代码,但是没有任何结果:( 它既不能在UIBarButtonItem上进行操作,也不能在其自定义视图上进行操作。
[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];
我确认该变换可用于其他视图(我尝试使用self.view)。
谢谢!
我尝试过以下代码,但是没有任何结果:( 它既不能在UIBarButtonItem上进行操作,也不能在其自定义视图上进行操作。
[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];
我确认该变换可用于其他视图(我尝试使用self.view)。
谢谢!