开发者

Which font and size does apple use for the navigation bar title?

开发者 https://www.devze.com 2022-12-26 13:46 出处:网络
I 开发者_如何转开发made an totally custom navigation bar and would like to use the exact same font and size like apple does for the title of their navigation bar. It looks like some kind of fat printe

I 开发者_如何转开发made an totally custom navigation bar and would like to use the exact same font and size like apple does for the title of their navigation bar. It looks like some kind of fat printed arial, but not sure if that's right. Does anyone know?


iOS12 - iOS15 Large Title - System Bold 34 (San Francisco)

[UIFont boldSystemFontOfSize:34]

iOS9 - iOS15 Regular centered title - System Semibold 17 (San Francisco)

[UIFont systemFontOfSize:17 weight:UIFontWeightSemibold]

iOS8 - System Semibold 17 (Helvetica Neue)

[UIFont systemFontOfSize:17 weight:UIFontWeightSemibold]

iOS7 - System Bold 17 (Helvetica Neue)

[UIFont boldSystemFontOfSize:17];

Nice link about typo in iOS https://learnui.design/blog/ios-font-size-guidelines.html


Definitely not Arial. It's Helvetica. You can probably get the same font using

UIFont *navFont = [UIFont boldSystemFontOfSize:18];

Change the size to find out what Apple is using (and write it below in a comment if you find the best one).

All the navigation bar text has a white shadow underneath it to give it the embossed effect. It's a white shadow 1 pixel underneath the text. Use shadowColor and shadowOffset in a UILabel to get the same effect.


For iOS7 the correct font size is 17pt:

UIFont *navFont = [UIFont boldSystemFontOfSize:17];


UIFont *navFont = [UIFont boldSystemFontOfSize:22];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号