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];

原文地址:https://www.cnblogs.com/lisa090818/p/3666652.html