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
Post a Comment