天天看点

iOS添加背景图片方法

// 添加背景

UIImageView *bgView = [[UIImageView alloc] initWithFrame:self.view.frame];

[bgView setImage:[UIImage imageNamed:@"bg.jpg"]];

[self.view addSubview:bgView];

[self.view sendSubviewToBack:bgView];