cocoa-touch - 使用 colorWithPatternImage 为 UIView 着色
问题描述
我需要使用重复的图案图像,但同时我需要对其进行着色
使用时
self.dividerView.tintColor = [UIColor redColor];
self.dividerView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"divider"]];
未应用 tint color ,这是可以理解的,但是如何使用 pattern 功能以及 tint color 功能?(例如有一个有色图案图像)
PS:图片当然是模板图片
解决方案
推荐阅读
- apache-kafka - 无法发送嵌入到 Kafka 主题的模式的 json(使用邮递员):错误代码 422
- postgresql - Postgres - 为 2 列中的值配置唯一约束
- reactjs - TypeScript - 导出默认为
- wordpress - 从管理员的小部件表单中删除默认的 Wordpress 字段
- python - snakemake 在配置中声明临时文件
- angular - 如何使用 rxjs “查找”运算符
- xml - QXmlStreamWriter 查找标记值并替换为另一个特定值
- python - 无法将字符串转换为浮点异常
- jquery - 如何使用 jQuery click 事件将项目动态添加到数组中?
- javascript - 如何使用 eslint 忽略 TS 错误 TS2339:“类型的值上不存在属性”