Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using standard refresh button

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?

like image 928
Claus Broch Avatar asked Jun 29 '10 20:06

Claus Broch


4 Answers

Here's the png, straight from the OS:

enter image description here

enter image description here

like image 65
spiralstairs Avatar answered Nov 07 '22 12:11

spiralstairs


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.

like image 37
bpapa Avatar answered Nov 07 '22 11:11

bpapa


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.

like image 4
Alex Reynolds Avatar answered Nov 07 '22 13:11

Alex Reynolds


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/

like image 1
Nicholas M T Elliott Avatar answered Nov 07 '22 12:11

Nicholas M T Elliott