mattlawer/BButton

How to properly update awesomeIcon?

jonmadison opened this issue · 1 comments

I have a BButton, acting as a toggle, that utilizes the FAPlay icon before pressed, but when pressed, wants to switch to the FAStop icon. Using

- (void)addAwesomeIcon:(FAIcon)icon beforeTitle:(BOOL)before

simply adds a new icon to the existing button.

What's the recommended way of changing the button icon? instantiate a new button? I'm in the middle of creating a new API call, updateAwesomeIcon, but want to make sure there's not a better recommended way of doing this.

I was also wanting to know how to do what @jonmadison has mentioned, but to also be able to update the text at the same time.