gpt4 book ai didi

objective-c - 使用异步显示工具包缩放文本 ASTextNode

转载 作者:搜寻专家 更新时间:2023-11-01 05:48:49 24 4
gpt4 key购买 nike

我看到有一个类 ASTextKitRenderer,但我不确定它的正确用法以及如何将它导入我的 swift 项目。

我想为 ASTextNode 重新创建 UILabel 的 minimumScaleFactor 的行为

最佳答案

只花了2个小时搜索相同的终于想出了解决方案,你只需要使用

_textNode.pointSizeScaleFactors = @[@(0.5)];

正如文档所说

An array of descending scale factors that will be applied to this text node to try to make it fit within its constrained size. This array should be in descending order and NOT contain the scale factor 1.0. For example, it could return @[@(.9), @(.85), @(.8)]; defaults to nil (no scaling)

Have a look at this

关于objective-c - 使用异步显示工具包缩放文本 ASTextNode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36297759/

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