I have a class without a .xib file, and I want to set the background using UIImageView with the .png file that I have in resources, I try this:
UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]]; [[self view] setBackgroundColor:background]; [background release];
this work, but the image is scaled and loses a lot of quality, instead, in another class with an xib file, I install UIImageView in the background using Interface Builder, and the image is perfect, I want to know how I can install UIImageView in the background, as I I do in the interface builder.
source share