【发布时间】:2011-03-09 20:16:16
【问题描述】:
我正在尝试使用 UIKit 内置的刷新图标在标准 UIView 中使用 UIButton 显示一个小的刷新按钮。如果我使用 UIBarButtonItem,它可以创建为刷新按钮,但我在其他地方使用此图标时运气不佳。
到目前为止,我已经尝试使用下面的代码“窃取” UIBarButtonItem 的刷新图像,但返回的图像为零:
UIBarButtonItem *temp = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:nil action:nil];
self.refreshButton.imageView.image = temp.image;
[temp release];
有什么建议,还是我必须自己提供刷新图像?
【问题讨论】: