开发者

how to reset UIButton background image mentioned in interface builder?

开发者 https://www.devze.com 2023-03-29 05:57 出处:网络
开发者_Python百科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 rest

开发者_Python百科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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消