UIImageView * one = [[UIImageView alloc] initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@“ball1.png”]]];在UIPickerView中添加图片
UIImageView *two = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball2.png"]]] ;
UIImageView *three = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball3.png"]]] ;
arrayBalls = [[NSArray alloc]initWithObjects:one,two,three,nil];
我用上面的代码在UIPickerView中显示图像。但执行此代码时,应用程序崩溃。
任何人都请帮忙。
我得到了以下错误,请帮助 ***终止应用程序由于未捕获的异常'NSInvalidArgumentException',原因:'*** - [UIImageView isEqualToString:]:无法识别的选择器发送到实例0x4a21df0' – isarathg 2010-04-06 21:03:03