objective c - Check if image is already stored using Parse -


i have image data i'm retrieving parse database, i'm not sure if app using internet connection every time retrieve images when there's cached copy in device. when turn off wifi images still load, know there cached copy, how change code or add code make sure app checks see if cached file being stored before attempting communicate database?

this code:

pfuser * current = [pfuser currentuser]; name = current[@"name"]; pffile * image = current[@"image"];  //how check if cached copy exists before executed code? [image getdatainbackgroundwithblock:^(nsdata *data, nserror *error){     if (!error) {         setimage = [uiimage imagewithdata:data];      } }]; 


Comments