gpt4 book ai didi

ios - colorWithPatternImage 在 io6 中不起作用?

转载 作者:可可西里 更新时间:2023-11-01 03:31:13 24 4
gpt4 key购买 nike

我正在使用 colorWithPatternImage 更改 UITextView 的文本颜色。它在 IO7 中工作正常但在 IO6 中不工作。

这是我的代码:-

text.textColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ColorName.png"]];

最佳答案

UITextView 的内部结构在 iOS 6 和 7 之间发生了巨大变化。在 iOS7 之前,UITextView 不支持文本颜色的图案颜色。多个组件在 iOS 7 中获得了对图案颜色的支持,UITextView 就是其中之一。

关于ios - colorWithPatternImage 在 io6 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24967682/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com