I want to get image from IImage object from specified path location.Here is the code .
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writablePath = [documentsDirectory stringByAppendingPathComponent:@"image1.png"];
NSLog(writablePath);
UIImage *image=[UIImage imageNamed:writablePath];
I get image object nil. so what could be the problem? I have also varified that image1.png is there at writablePath.