Nadhas
Nadhas

Reputation: 5807

how to reset UIButton background image mentioned in interface builder?

I creating an iPhone application, set background image for UIButton using interface builder, then i changed the background image for that UIButton programmatically. Now i need to restore the background programmatically which i have used already(used in interface builder).

Upvotes: 0

Views: 336

Answers (1)

PengOne
PengOne

Reputation: 48398

After you change the background image programmatically, you either need to call -viewDidLoad (probably after calling -viewDidUnload) to reset the background, or change it again progammatically. The UIImage doesn't remember it's previous background, so there is no easier way to "restore" the setting.

Upvotes: 1

Related Questions