download image with Alamofire

濮阳和泰
2023-12-01
 Alamofire.request(.GET, profile_picture_url!).response { (request, response, data , error) in

                        if error != nil {
                            NSLog("Error downloading thumbnail image: \(error)")
                        } else {
                            if let downloadedImage = UIImage(data: data!) {

                                dispatch_async(dispatch_get_main_queue()) {
                                    self.topImageView.image = downloadedImage

                                }//dispatch_async(dispatch_get_main_queue())

                            }//if let downloadedImage = UIImage(data: data!)
                        }//else No error
                    }//Alamofire.request
 类似资料:

相关阅读

相关文章

相关问答