1

I am trying to assign a placeholderimage in my UIImageView but am getting this error

No visible @interface for 'UIImage' declares the selector 'placeholderImage:'

This is how I thought I might be able to do it... obviously wrong but anyway this is what the code looks like.

firstSpaceImageView.image = [[UIImage imageNamed:@"CA.png"] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

any help would be greatly appreciated.

4

2 回答 2

6

-[UIImageView setImageWithURL:placeholderImage:]AFNetworking的一部分。您需要包含它才能获得此方法。

于 2013-03-05T22:19:46.523 回答
0

placeholderImageUIImage(或 UIImageView)上没有调用属性。如果您想制作自己的占位符解决方案,这个问题会有所帮助。

PS:即使有这样的属性,setter方法也会setPlaceholderImage:placeholderImage

于 2013-03-05T22:19:31.450 回答