Swift:Use AFNetworking setImageWithURL

From Hawk Wiki
Revision as of 04:03, 23 March 2015 by Hall (Talk | contribs) (Created page with "Create the bridging file: create a new Objective-C file, name it anything, and when you save it, Xcode will prompt you generate a bridging file. <br> In an Objective-C bridgin...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Create the bridging file: create a new Objective-C file, name it anything, and when you save it, Xcode will prompt you generate a bridging file.
In an Objective-C bridging file:

#import <AFNetworking/UIImageView+AFNetworking.h>

In the swift view file, to set a imageView using URL:

setImageWithURL(NSURL(string: thumbnailURL))