【发布时间】:2014-04-02 19:43:38
【问题描述】:
我想设计一个视图,其中UILabel 文本应保持透明,以便背景图像可以通过文本看到,即UILabel 的透明文本
随着移动UILabel,文字颜色应根据背景变化
图片
请帮帮我
UIImage *croppedImage=[self crop:self.demo.frame];
self.demo.textColor=[UIColor colorWithPatternImage:croppedImage];
我正在裁剪演示大小的图像(UILabel)并设置其文本颜色 但图像得到双重像素化
【问题讨论】:
-
[self crop:self.demo.frame] 检查这个方法,你没有得到正确的裁剪
-
你能建议我吗,如何用 UILabel 大小裁剪背景 imageView 图像?
-
您应该分析哪种类型的 textcolor 与图像颜色匹配,例如,如果您有黑色图像,请尝试使用 uilabel 的 darktextcolor
标签: ios