Unable to read Images from xcode project for example. drag and drop one image to xcode project, then read using following code.
__weak NSString *strTemp = [NSString stringWithFormat:@"%@/s_%@",[[NSBundle mainBundle] resourcePath],[[self.arr_gallery objectAtIndex:i]valueForKey:@"filename_larger"]];
strTemp = [strTemp substringToIndex:[strTemp length]-3];
strTemp = [NSString stringWithFormat:@"%@png",strTemp];
// NSString *strTemp = [[NSString alloc] initWithFormat:@"%@/[email protected]",[[NSBundle mainBundle] resourcePath]];
UIImage *image;
image = [[UIImage alloc] initWithContentsOfFile:strTemp];
img.image = image;
strTemp = nil;
NSLog("%@", strTemp)
? – Sekalf NrocimagePath
. – Sekalf Nroc