如何做的UIImage为NULL在Objective-C
问题描述:
我用的代码:UIImage *selectedImage;
如何做的UIImage为NULL在Objective-C
然后,
for (int j = 1 ; j <=b ; j++){
id subView = [self.view viewWithTag:j];
if ([subView isKindOfClass:[UIImageView class]]){
((UIImageView *)subView).image = selectedImage;
那么如何使作为UIImage的空值。
答
而不是使UIImage
NULL的图像设置为空图片
[UIImage imageNamed:@""]
答
如果你想简单地设置你的形象为空,只是做:
yourImage = nil;
如果我missunderstood或者如果我错了,请不要犹豫,让我知道。 :)
你想从视图中删除它或只是想设置空的图像? –
该怎么做代码 – teena
目前还不清楚你想要什么?你想让哪个图像为NULL? selectedImage? –