Tuesday, June 29, 2010

Using standard refresh button

Programmer Question

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?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails