mardi 5 mai 2015

fileExistsAtPath gets filename with just a path?

I'm working with Dropbox API and I'm loading images into the app's Documents directory using the API delegate method loadFile:intoPath:. Dropbox's completion callback method, restClient:loadedFile:, fires ok with (NSString*) destPath as the second param. Each destPath that is returned for each file is the same, something like:

/Users/<myID>/Library/Developer/CoreSimulator/Devices/<Device #>/data/Containers/Data/Application/<App #>/Documents

But when I call this:

UIImageView *imageView=[[UIImageView alloc] initWithFrame:CGRectMake(xPos, 0, 500, 500)];
[imageView setContentMode:UIViewContentModeScaleAspectFit];
imageView.image =  [UIImage destPath];
[self.view addSubview:imageView];

... I get four distinct images! How is this happening? How is Dropbox able to get the distinct images with the same exact path?

Aucun commentaire:

Enregistrer un commentaire