ios - Using UIActivityIndicator-for-SDWebImage with Swift -


i'm using sdwebimage , add loading indicator. found uiactivityindicator-for-sdwebimage library, , have tried add swift project adding this:

#import "uiimageview+uiactivityindicatorforsdwebimage.h" 

to bridging header. reason still can't access parameter usingactivityindicatorstyle when setting image urls.

anyone have idea i'm doing wrong? i've tried removing .m , .h files , re-adding them, didn't help.

  1. add "use_frameworks!" in podfile

    use_frameworks!  target '<your target>' .........     pod 'uiactivityindicator-for-sdwebimage' ......... end 
  2. in "pods -> uiactivityindicator-for-sdwebimage -> uiimageview+uiactivityindicatorforsdwebimage.h" replace:

    #import "uiimageview+webcache.h" #import "sdimagecache.h" 

    with:

    #import <sdwebimage/uiimageview+webcache.h> #import <sdwebimage/sdimagecache.h>  
  3. in "appdelegate.swift" add

    import uiactivityindicator_for_sdwebimage 

    that's all.

p.s. should correct pods because author of uiactivityindicator-for-sdwebimage wrote in description: "... don't want keep repo updated ...", , doesn't it.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -