Color Me Crazy (or "When a Color Isn't Just a Color")
Posted on Thursday, Nov 19, 2009 12:00 AM
Ever need to use an image as a background, but can't figure out how? It's quite simple -- colors aren't always colors:
UIImage *patternImage = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"patternImage" ofType:@"png"]];
[myView setBackgroundColor:[UIColor colorWithPatternImage: patternImage]];