https://www.hackingwithswift.com/example-code/uicolor/how-to-use-an-image-for-your-background-color-with-uicolorpatternimage

        let image :UIImage! = UIImage(named:"connectable_device_ble_pebble")

view.backgroundColor = UIColor(patternImage: image)

效果如下:

最新文章

  1. Mac环境下JDK安装方法
  2. Java数组扩容算法及Java对它的应用
  3. 使用fastboot工具刷入recovery.img、boot.img、system.img等
  4. Delphi 中的 procedure of object
  5. Android(java)学习笔记102:Map集合功能概述
  6. IOS开发中针对UIImageView的几种常用手势
  7. python3 解析apk图标
  8. /dev/shm(转)
  9. Linux 在线模拟器
  10. hihoCoder #1465 : 后缀自动机五·重复旋律8
  11. draw9patch图片拉伸
  12. WPF Demo18 路由事件
  13. Qt解决:Qobject::connect queue arguments of type ‘xxxx’,Make sure ‘xxxx’ is registered using qRegister
  14. Html+Css实现梯形选项卡
  15. 温故而知新-XML和WEB服务器
  16. HDU 2389 Rain on your Parade(二分匹配,Hopcroft-Carp算法)
  17. 使用jsmin压缩javascript脚本
  18. 爬虫:Scrapy16 - Spider Contracts
  19. Dapper.Common基于Dapper的开源LINQ超轻量扩展
  20. Codeforces Round #374 (Div. 2) D. Maxim and Array —— 贪心

热门文章

  1. luoguP3370 【模板】字符串哈希 [hash]
  2. 【Codeforces 1185C2】Exam in BerSU (hard version)
  3. NX二次开发-UFUN文件选择对话框UF_UI_create_filebox
  4. NX二次开发-关闭信息窗口UF_UI_close_listing_window
  5. inobounce.js : 禁止IOS H5的滑动回弹
  6. [JZOJ 5814] 树
  7. Android Canvas save和restoreToCount
  8. [转]WinForm DataGridView 绑定泛型List(List<T>)/ArrayList不显示的原因和解决
  9. (转)Python之路,Day6 - 面向对象学习
  10. 将sparkStreaming结果保存到Redshift数据库