Difference between revisions of "Swift:Use AFNetworking setImageWithURL"

From Hawk Wiki
Jump to: navigation, search
(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...")
 
(No difference)

Latest revision as of 04:03, 23 March 2015

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))