Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

屏幕渲染机制 #44

Open
ShannonChenCHN opened this issue Apr 27, 2017 · 3 comments
Open

屏幕渲染机制 #44

ShannonChenCHN opened this issue Apr 27, 2017 · 3 comments

Comments

@ShannonChenCHN
Copy link
Owner

No description provided.

@ShannonChenCHN ShannonChenCHN changed the title 【问题】APP 上的 HTTPS 请求如何抓包? 【专题】屏幕渲染机制 Jun 24, 2017
@ShannonChenCHN ShannonChenCHN changed the title 【专题】屏幕渲染机制 屏幕渲染机制 Jul 2, 2017
@ShannonChenCHN
Copy link
Owner Author

ShannonChenCHN commented Aug 3, 2018

Proportional Fonts VS. Monospace Fonts

问题

在使用 UILabel 显示 “01:11:10” 这种数字时,数字 1 的宽度和数字 0 的宽度不同。

解决办法

方法一

iOS 9.0 以前,可以通过设置 font family 为某些特殊字体,来实现 monospace 的效果:

UIFont(name:"Courier", size: 17)

iOS 9.0 及以后,UIFont 新增了 monospace 的 API:

+[UIFont monospacedDigitSystemFontOfSize: weight:]

方法二

让设计师专门设计一套数字 iconfont

方法三

单独为每个数字添加固定宽度的 label

参考

@ShannonChenCHN
Copy link
Owner Author

ShannonChenCHN commented Jun 10, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant