ios - How to display images from dropbox in UIImageView -
I am using images in my application to import images from Dropbox; For image dasplay in UIImageView I have the following code
UIImageView * imageView = [[UIImageView alloc] initWithFrame: CGRectMake (0, 0, 500, 500)]; Imagaviavkimej = [Uiimage Imagavithdata [Nsdta Duttvitcontentsofurl [Nsurl Urlvithsring: @ "Https://wwwkdropbokskcom/s/7qey2let40eb9je/priliminri_form_2kjpg"]]]; [Self.view addSubview: imageView]; But the picture is not being displayed in the application. Please help me to display a Dropbox image in UIImageView, the issue about it is https or what? try to :
+ (zero) downloadImage: (NSURL *) URL withCallBack: (DownloadCallbackBlock) callback {NSURLRequest * URLRequest = [NSURLRequest requestWithURL: URL]; NSOperationQueue * queue = [[NSOperationQueue alloc] init]; [NSURLConnection sendAsynchronousRequest: URLRequest Qatar: Qatar completionHandler: ^ (NSURLResponse * reaction, NSData * data, NSError * error) {NSHTTPURLResponse * HttpResponse = (NSHTTPURLResponse *) response; If (httpresponse.statusCode == 200) {callback (error, data); } Else {// Error}}]; } to I use it:
[DownloadManager downloadImage: URL withCallBack: ^ (NSError * error, NSData * data) {if (data ) {UIImage * image = [[UIImage alloc] initWithData: data]; [_RR images object: image]; Dispatch_assink (transmitted_tot_me_q ()), ^ {{self-operationImage];}); }
Comments
Post a Comment