android 设置ios 字体大小设置,如何在iOS中设置UILabel字体大小dp(不在点数)就像只有自动布局的android一样...

In my iOS program, I want to set UILabel size in dp's. So that when the iOS device changes, according to scale factor (@1x, @2x, or @3x) my UILabel size will also changes proportionally.

在我的iOS程序中,我想在dp中设置UILabel大小。因此,当iOS设备发生变化时,根据比例因子(@ 1x,@ 2x或@ 3x),我的UILabel大小也会按比例变化。

Lets say for eg. @1x scale factor, I have UILabel size = 15pt, then It will automatically become 30pt @2x and 45pt @3x

让我们说,例如。 @ 1x比例因子,我有UILabel大小= 15pt,然后它将自动变为30pt @ 2x和45pt @ 3x

1 个解决方案

#1

1

I am not sure whether you can set UILabel size in dp's but instead what you can do is set "Autoshink" to "Minimum Font Size" and provide minimum desire font.

我不确定你是否可以在dp中设置UILabel大小,而是你可以做的是将“Autoshink”设置为“Minimum Font Size”并提供最小的字体。

aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9naXJ1TS5wbmc=

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值