Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by Insi ( 15 years ago )
- (UIImage*)loadImage:(NSString*)imageName
{
NSString *filename = [self determineImagePath:imageName];
NSFileManager *fileManager = [NSFileManager defaultManager];
self.currentImage = nil;
if([fileManager fileExistsAtPath:filename])
{
NSData *imageData = [[NSData alloc] initWithContentsOfFile:filename];
UIImage *image = [UIImage imageWithData:imageData];
[imageData release];
self.currentImage = image;
}
else
currentImage = [UIImage imageNamed:imageName];
return self.currentImage;
}
Revise this Paste