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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -