code_junkie

vs [UIImage imageWithData…]

Nov 12th, 2011
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. [UIImage imageNamed:fullFileName]
  2.  
  3. NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:extension];
  4. NSData *imageData = [NSData dataWithContentsOfFile:fileLocation];
  5.  
  6. [UIImage imageWithData:imageData];
  7.  
  8. NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:extension];
  9. UIImage* yourImage = [[[UIImage alloc] initWithContentsOfFile:imagePath] autorelease];
Add Comment
Please, Sign In to add comment