[英]What size font is the title in a default UIButton?
UIButton中的默認字體大小是多少?
我檢查了Apple的文檔,但我找不到它 - https://developer.apple.com/documentation/uikit/uibutton
它的System Bold 15.0
。 你可以在這里查看。
您可以使用此代碼更改字體。
[myButton.titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:13.0]];
您可以在創建按鈕時在Interface Builder中看到它,它是:
系統大膽15.0
只需查看Xcode中的Storyboard編輯器,選擇Round Rect按鈕 ,就可以在Attributes Inspector中看到字體為“ System Bold ”,大小為15 (pt)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.