iphone - Programatically added UIButtons keep the background image even after the image is changed or deleted -


i have array of programmatically added buttons in slide-view. configured , works fine after including images show up. problem when change image 1.png other (i named 1.png again) shows same image deleted project. using arc... here part of code:

nsstring *imagepath = [[nsstring alloc] init]; imagepath = [nsstring stringwithformat:@"%d.png", i]; uiimage *buttonimage = [[uiimage alloc] init]; buttonimage = [uiimage imagenamed:imagepath]; [abutton setimage:buttonimage forstate:uicontrolstatenormal]; 

try clean , rebuild project. delete app device/simulator before running again.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -