ios - I want cache images without show them in any imageView how do this i want do progress while I´m change to use the by url later -


sdwebimagedownloader *downloader = [sdwebimagedownloader shareddownloader];                 [downloader downloadimagewithurl:[[nsurl alloc] initwithstring:url]                                          options:0                                         progress:^(nsinteger receivedsize, nsinteger expectedsize) {                                             // progression tracking code                                         }                                        completed:^(uiimage *image, nsdata *data, nserror *error, bool finished) {                                            if (image && finished) { }}); 

try one:

-(uiimage *)downloadimageasync:(nsstring *)imagekey {      nslog(@"image key : %@",imagekey);       __block uiimage *returnedimage;       sdwebimagemanager *manager = [sdwebimagemanager sharedmanager];       [manager downloadwithurl:[nsurl urlwithstring:imagekey] options:0 progress:^(nsuinteger receivedsize, long long expectedsize){        nslog(@"received size %d expected size %lld", receivedsize, expectedsize);       }completed:^(uiimage *image, nserror *error, sdimagecachetype cachetype,bool finished){        if(image && finished) {            returnedimage = image;        }   }];     if(returnedimage == nil) {       nslog(@"returned image nil");    }   return returnedimage; } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -