可以使用UIKit Artwork Extractor提取刷新图形本身.(或者,从众多免费iphone图标集中获取一个刷新图标,如Glyphish)
要将它放在像Safari中的UITextField中,请将UITextField rightView属性设置为UIImageView或UIButton,并将图像设置为刷新图像.
UITextField* myTextField = [[[UITextField alloc] initWithFrame: CGRectMake(0,0,200,44)] autorelease];
myTextField.rightView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"UIButtonBarRefresh.png"]] autorelease];
Run Code Online (Sandbox Code Playgroud)
如果要获取刷新按钮的TouchUpInside通知,则需要使用UIButton而不是UIImageView.
归档时间: |
|
查看次数: |
3192 次 |
最近记录: |