How to deal with background image orientation in UIView

Posted by docchang on Stack Overflow See other posts from Stack Overflow or by docchang
Published on 2011-01-04T09:36:01Z Indexed on 2011/01/06 1:54 UTC
Read the original article Hit count: 504

I'm using setting the background image using methodology below. When I rotate my device the background repeats, which make sense because it is not an image. How do I deal with orientation change if this is the way I'm setting my background image?

- (void)viewDidLoad {
    [super viewDidLoad];
    UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]];
    self.view.backgroundColor = background;
    [background release];
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c