0

私は現在、このようにウェブから画像をロードするアプリを持っています

[self.userImage setImageWithURL:IMAGEURL placeholderImage:[UIImage imageNamed:@"userPhoto.png"]];

そしてそれは完全に機能します。ユーザーがアプリを再度開いたときに画像がすばやく表示されるように、何らかの方法で画像を保存またはキャッシュできるかどうかはまだ疑問です。

どんな助けでも大歓迎です。

編集:

SDWebImage をクラスにインポートした後、コンパイルすると、このエラーが発生します

Ld "DerivedData/Social App/Build/Products/Debug-iphonesimulator/Social App.app/Social App" normal i386
    cd "/Users/iamgretara/Documents/YouTube app "
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk "-L/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator" "-L/Users/iamgretara/Documents/YouTube app /GDATA" "-F/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator" -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist "/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Intermediates/Social App.build/Debug-iphonesimulator/Social App.build/Objects-normal/i386/Social App.LinkFileList" -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework ImageIO -framework MediaPlayer -framework CoreText -framework AVFoundation -framework SystemConfiguration -framework Security -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/iamgretara/Documents/YouTube app /DerivedData/Social App/Build/Products/Debug-iphonesimulator/Social App.app/Social App"

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_MKAnnotationView", referenced from:
      l_OBJC_$_CATEGORY_MKAnnotationView_$_WebCache in MKAnnotationView+WebCache.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

エラーのイメージ

4

3 に答える 3

0

これを試して:

画像キャッシュのサポートについては、 EGOImageLoading を試すことができます。

于 2013-07-15T12:06:59.087 に答える