单击按钮清除图像数组 [英] clear image array on button click

查看:49
本文介绍了单击按钮清除图像数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数组

 imageArray  = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"1.png"], 
                            [UIImage imageNamed:@"2.png"],
                            [UIImage imageNamed:@"3.png"],
                            [UIImage imageNamed:@"4.png"],
                            [UIImage imageNamed:@"5.png"],
                            [UIImage imageNamed:@"6.png"],
                            [UIImage imageNamed:@"7.png"],
                            [UIImage imageNamed:@"8.png"],
                            [UIImage imageNamed:@"9.png"],
                            [UIImage imageNamed:@"10.png"],
                            [UIImage imageNamed:@"11.png"],
                            [UIImage imageNamed:@"12.png"],
                            nil];

我想在单击按钮时清除此数组.

i want to clear this array on button click.

这些是屏幕上的一系列图像.

these are series of images on screen.

如果我按下按钮,则清除图像应清除所有图像.

and if i press button clearing the image should clear all the images.

我该怎么办?

致谢shishir

推荐答案

[imageArray release];
imageArray = nil;

这篇关于单击按钮清除图像数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆