How to fill the background with image in landscape in IOS? 如何使image水平铺满屏幕

UIImageView *backgroundImage = [[UIImageView alloc] initWithFrame:self.view.frame];
    [backgroundImage setImage:[UIImage imageNamed:@"spriteBG.png"]];
    [backgroundImage setContentMode:UIViewContentModeTopLeft];
    [self.view addSubview:backgroundImage];
    [self.view sendSubviewToBack:backgroundImage];

posted @ 2014-04-15 16:58  如来藏  阅读(308)  评论(0编辑  收藏  举报