views:

68

answers:

3

I'm trying to display a small refresh button using UIButton in a standard UIView using the refresh icon built into UIKit. If I use an UIBarButtonItem it can be created as a refresh button, but I've had no luck in using this icon in other places.

So far I've tried to "steal" the refresh image of a UIBarButtonItem using the code below, but the image returned is nil:

UIBarButtonItem *temp = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:nil action:nil];
self.refreshButton.imageView.image = temp.image;
[temp release];

Any suggestions, or do I have to provide a refresh image myself?

A: 

You'll have to either make one yourself, hire a designer, or find a free one somewhere that you can use. The Toolbar buttons can only be used inside of a toolbar.

bpapa
Thanks, though not what I hoped to hear I suspected it would be the case.
Claus Broch
+2  A: 

Glyphish has a free set of icons, including a "refresh" icon, which you can use if you agree to the Creative Commons Attribution license terms.

Alex Reynolds
+1  A: 

I don't know that Apple would allow you to use their UI images in a way they deem inappropriate, but you could always try a screenshot and store the image in your project yourself. You can run a sample in the simulator to get an easy screenshot on your development machine.

Failing that, I've found a ton of excellent icons sets at http://icons.mysitemyway.com/

Nicholas M T Elliott