0

私はフレームワークを正しく実装してインストールしましたが、これには何日もかかりました。これも初めてです。Webからこの画像を持っているので、解析してSDImageViewを使用してそれらの画像をロードしたいのですが、コンパイル後にこの例外

-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730
[2456:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730'

プレースホルダー値を削除すると、この例外が表示されます

-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960
[2236:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960'

私のコードも次のようになります。

NSString *imageLink = [currentData imageLinkFromWeb];
[cell.imageView setImageWithURL:[NSURL URLWithString:imageLink]  placeholderImage:[UIImage imageNamed:@"image.jpg"]];
4

1 に答える 1

0

私もこれに遭遇しました。私にとっては、ビルド設定に -ObjC リンカー フラグを追加しなかったことが原因でした。フラグを追加する手順については、こちらをご覧ください。幸運を!

于 2015-03-04T16:03:21.823 に答える