我想出了如何创建一个带有按钮的摆动动画link。但是,如果是uibarbuttonitem,则需要transform
属性。我希望为这个UIBarButtonItem创建这个摇摆动作。我怎样才能做到这一点?
答案 0 :(得分:0)
试试这个,
UIButton *button = [[UIButton alloc] init];
[button setTransform:<#(CGAffineTransform)#>]; // SET YOUR TRANSFORM HERE
UIBarButtonItem *barButton = [[[UIBarButtonItem alloc] initWithCustomView:button] autorelease];
self.navigationItem.leftBarButtonItem = barButton;