gpt4 book ai didi

swift - 使用 SF Symbols 时调整 UImage 的大小 - UIImage(systemName :))

转载 作者:行者123 更新时间:2023-12-04 11:55:32 26 4
gpt4 key购买 nike

我有以下预打包的系统 SF 镜像:

UIImage(systemName: "location.fill")

这可能看起来微不足道,但我如何调整它的大小以使其更大?谢谢你。

最佳答案

您可以实例化 UIImage.SymbolConfiguration .例如,您可以指定磅值:

let configuration = UIImage.SymbolConfiguration(pointSize: 24)
let image = UIImage(systemName: "location.fill", withConfiguration: configuration)
UIFont.TextStyle :
let configuration = UIImage.SymbolConfiguration(textStyle: .title1)
let image = UIImage(systemName: "location.fill", withConfiguration: configuration)
使用后一种方法,它将遵守设备上的可访问性文本大小设置。

关于swift - 使用 SF Symbols 时调整 UImage 的大小 - UIImage(systemName :)),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60910712/

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