Adding a refresh logo like in Safari to iOS apps

Hello,


I have a small app that downloads and a few images from the internet and displays them in Image Views.

I have created a button that calls the function to reload the images.


However, this is essentially a plain button with just a text label "REFRESH". Next to it, I have positioned an activityIndicatorView.

This takes up a lot of screen space.


Instead, I was hoping to use a Safari Refresh button instead. I found a post on Stack Overflow discussing this (which shows an example of what I mean), but I'm new to iOS development and couldn't really understand it.


Is anyone aware of documentation or any tutorials that would explain how to do this?


Thanks in advance.

Dave

Accepted Answer

I don't know if it needs specific documentation or tutorials. You just don't specify a title for the button, and give it an image instead. When you add the image to your asset catalog or app bundle, it should show up in the drop down menu in IB in the same spot where you entered the button title.

Thanks for that, junkpile. By clicking on the button and then opening the Attributes Inspector, I then see the "Image" option (from which I can choose the image from the Assets folder).

Thanks a bunch!

Adding a refresh logo like in Safari to iOS apps
 
 
Q