开发者

how to reload the UIImage in myView in iphone

i have created an app which is used to select an image in an DetailViewclass and the selected picture willbe added to anotherViewClass. i got the picture in another view which was selected in开发者_开发问答 the DetailViewclass. but i want UIImage to be empty when the page is reloaded.


set the image of uiimageview to nil in the viewwillapear and again allocate it the image in viewwillappear.

in viewwillappear

imageview.image=nil;
imageview.image=[UIImage imageNamed:mynewimagename];

hAPPY cODING...


How about using putting a code setting UIImageView instance's image to nil in viewDidAppear or viewWillAppear?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜