3
A
回答
6
是的,标签可以有图案颜色。
alt text http://img178.imageshack.us/img178/1995/textwithpatterncolor.png
// make a UIColor with an image as the pattern
UIImage *tileImage = [UIImage imageNamed:@"hot_grad_64px.png"];
UIColor *patternColorTile = [UIColor colorWithPatternImage:tileImage];
// assign it to the .textColor property of a UILabel
self.testLabel.textColor = patternColorTile;
// the pattern will only align if both the .frame property of the
// label AND the font size is the same as the image tile height
的图案可以由多个图案的颜色之间的切换进行动画处理。我已经在图案图像和纯色之间以> 30fps翻转,iPhone设备保持良好状态。
只要图像拼贴很小,我没有看到任何理由不这样做,但我没有广泛地描述它。
相关问题
- 1. 将NSMutableString分配给UILabel文本
- 2. 将UIlabel的文本分配给文本字段
- 3. 将代码中的文本分配给UILabel! Swift 2.2
- 4. iOS如何找出UILabel是否改变了它的文本
- 5. 提供给通配符查询的文本是否已分析?
- 6. 将英文和希伯来文文本分配给相同的uilabel
- 7. 是否可以分配给$!在Perl中?
- 8. 分配给指针的指针:我是否应该释放它?
- 9. END块中的本地($?) - 为什么它分配给它的值是什么?
- 10. 是否有可能将CssClass分配给CheckBoxList中的CheckBox
- 11. 将文本分配到多行UILabel的一行中
- 12. 是否需要在将元素分配给它之前分配指针数组?
- 13. 文本中的UILabel
- 14. 是否将子例程的结果分配给数据副本?
- 15. 如果未定义变量,是否有任何默认值分配给它们?
- 16. 将文本颜色分配给edittext中的文本
- 17. 当空分配给它
- 18. 检查UILabel中是否有换行符
- 19. 是否可以将文本字段的值分配给单选按钮
- 20. UILabel中的中心文本
- 21. 有没有在JavaScript的方式来查看是否有变量分配给它的超时?
- 22. 覆盖UILabel中的'文本'
- 23. UILabel文本多行给定文本的宽度
- 24. 将文本分配给数组
- 25. 将行号分配给文本框
- 26. 如何将文本文件中的值分配给Visual Studio c#?
- 27. 是否可以将整数分配给Python中的单词?
- 28. 的UILabel doubble文本
- 29. 无法将Int的变量分配给UILabel
- 30. 在WPF应用程序中,是否有可以分配给FileSystemWatcher.SynchronizingObject的对象?
随着字体大小变得更大,这种填充颜色变得捉襟见肘,缩小比例,有什么想法如何解决这个问题? – jjxtra 2012-08-18 04:05:21