I’m trying to set the background image of a view based on a passed “artistID.” Here is my code so far:
NSString *backgroundImageName = [[NSString alloc]initWithFormat:@"artistbackground%i.png",_artistID];
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:backgroundImageName]];
NSLog(@"%@",backgroundImageName);
unfortunately, for the parameter in ImageNamed, I’m passing in:
artistibackground1
instead of:
@”artistbackgound1″
Any ideas on how to escape the @ and the quotes??
Thanks!!
Essentially make two strings, it will add the @”” in the second.