iphone - set image in UIImageview Programmatically -
i have build 1 application. in application set image in uiimageview @ button's clicked action. , next time clicked on button image changed, operation done. after sometime button clicked image not changed in uiimageview , print following message on console:
imageio: cgimageread_mapdata 'open' failed '/users/username/library/application support/iphone simulator/4.2/applications/02fe7a45-261f-4aed-ab37-592a228876fc/appname.app/imagename.png' error = 24 (too many open files)
i can use following code set image in uiimageview
nsstring *path = [[nsbundle mainbundle] pathforresource:strque oftype:@"png"]; uiimage *img = [[uiimage alloc] initwithcontentsoffile:path]; [img1 setimage:img];
where img1 object of uiimageview , strque name of image
imageio: cgimageread_mapdata 'open' failed '/users/username/library/application support/iphone simulator/4.2/applications/02fe7a45-261f-4aed-ab37-592a228876fc/appname.app/imagename.png' error = 24 (too many open files)
this wild stab in dark here, i'm guessing app opening many files.
Comments
Post a Comment