2017-09-12 17 views

回答

4

您可以根據屏幕尺寸計算字體大小。

let baseWidth: CGFloat = 320 // the width of the screen where you want to use 13pt 
let fontSize = 13 * (UIScreen.main.size.width/baseWidth) 
let font = UIFont(name: "HelveticaNeue", size: fontSize) 
+0

簡單的做到這些,Automatically Adjusts Font你的意思是說我已經用上述公式 –

+0

@ShankarNaik是編程設置字體大小,你應該做的。 – the4kman

+0

謝謝我會嘗試 –

3

您可以通過檢查Attributes InspectorLike this

+0

謝謝我會嘗試 –

+0

自動調整字體不可用於按鈕 –

+0

我treid運行應用程序與調整字體/ ...但對我的眼睛字體大小似乎相同..我嘗試iPhone 7 plus和5s –

相關問題