iOS开发:给UIView设置背景图片 发表于 2014-02-22 更新于 2022-11-07 分类于 Objective-C/Swift/iOS UIView没有setBackgroundImage方法,只有setBackgroundColor,但是图片可以转成UIColor,所以,设置方法: [[self view] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_player"]]];