Hi all,
I'm setting a view background to a repeating image using colorWithPatternImage. If the view size changes after I've set the background the first time, the image gets stretched instead of repeating for the new size - any ideas how I can fix this?
This is what I'm doing:
set the view's background in viewDidLoad:
frameView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"frame-repeat.png"]];
grab some information from the server, update the view, change the view's frame size to fit the new content (usually, this means making the view taller)
background image is now stretched, even if I set the backgroundColor again using the exact same code.
If I don't do the initial background set, and only set it after I retrieve the data from the server and change the view size, it looks great - repeats, and no stretching. However, that means no background while the data is loading... looks ugly.
Has anyone else run into this?
Thanks for any help!