4

I have some text field and I need refresh button like in Safari navigation bar.

How can I use it instead of making my own?

enter image description here

dormitkon
  • 2,526
  • 4
  • 39
  • 60

2 Answers2

5

The refresh graphic itself can be extracted using UIKit Artwork Extractor. (Or, get a refresh icon from one of the many free iphone icon sets, like Glyphish)

To place it in a UITextField like in Safari, set the UITextField rightView property to a UIImageView or UIButton with the image set to the refresh image.

UITextField* myTextField = [[[UITextField alloc] initWithFrame: CGRectMake(0,0,200,44)] autorelease];

myTextField.rightView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"UIButtonBarRefresh.png"]] autorelease];

You'll want to use a UIButton instead of a UIImageView if you want to get the TouchUpInside notification for the refresh button.

TomSwift
  • 39,369
  • 12
  • 121
  • 149
3

It's a custom safari widget. You have to make your own.

amattn
  • 10,045
  • 1
  • 36
  • 33
  • The meaning is that the art isn't a native asset you can just call up. You make it or get it from an icon set. – amattn Apr 04 '11 at 03:37