Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImage View reset/empty

HI all I am developing an iOS app which allows the user to pick an image using UIImagePicker. Now I have to create the action that restores the UIIageView with no image inside. can anyone help me with code?

-(IBAction)emptyImage{

//code to empty the UIImageView

}
like image 245
kuranes Avatar asked Dec 21 '22 03:12

kuranes


1 Answers

-(IBAction)emptyImage{

   imageView.image=[UIImage imageNamed:@"noimage.png"];  (OR)

   imgview.image= nil; (OR)

   imgview.image= [UIImage imageNamed:@""];


}
like image 191
Balu Avatar answered Dec 24 '22 10:12

Balu