I have a string variable(imageStr) in which I have name of an image I am fetching from sqlite
database. How can I assign that string variable as an image name to a imageview
?
Code:
UIImageView *imageHolder = [[UIImageView alloc] initWithFrame:CGRectMake(150, 11, 50, 25)];
UIImage *image = [UIImage imageNamed:imageStr];
imageHolder.image=image;
NSLog(@"image in mediView:%@",imageHolder.image);
In the log I am getting NULL
value. If I print just "imageStr" then it is giving me string value.