如何使UIBarButtonItem与UIButton具有相同的点击效果?

时间:2012-08-03 06:44:38

标签: iphone objective-c uibarbuttonitem

如何使UIBarButtonItem具有属性(Style:Bordered and Identifier:Custom)单击效果(如UIButton选择状态)??

1 个答案:

答案 0 :(得分:1)

UIButton *button = [UIButton button...];
...

UIBarButtonItem *barButtonItem = [UIBarButtonItem initWithCustomView:button];

See apple's documents