打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
IOS开发之控件加载背景图片


设置一般View的背景

UIImageView *imgView [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back-568h"]];
    imgView.frame self.view.bounds;
    imgView.autoresizingMask UIViewAutoresizingFlexibleWidth;
    [self.view insertSubview:imgView atIndex:0];


设置UITableView的背景
UIImageView *imgView [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back-568h"]];
    imgView.frame self.view.bounds;
    imgView.autoresizingMask UIViewAutoresizingFlexibleWidth;
    [self.tableView setBackgroundView:imgView];

设置View的背景颜色,使用图片,效果和设置背景图片比较类似


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
iOS面试题-UI篇
IOS UIImageView直接响应点击事件
疯狂ios讲义之图像控件(UIImageView)
iOS开发UI篇—UIScrollView控件实现图片缩放功能
iOS: 使用CGContextRef中的Transform来辅助作图
IOS 裁剪图片
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服