研究 label 的欄位: Line Breaks & Autoshrink

Tim Tseng
Tim Tseng
Jul 21, 2017 · 2 min read

在使用Label元件於多行輸入時,不同Line Break設定的顯示差異研究。

Clip : 針對label 的寬度,換行時保有完整單字,從整段文字最後部分刪除
Character Wrap : 換行時的斷點以字母為單位,非單字
Word Wrap : 換行時的斷點以單字為單位
Truncate Head : 換行後於 label 左方(head)以…代表刪除部分
Truncate Middle : 換行後於 label 中間(middle)以…代表刪除部分
Truncate Tail: 換行後於 label 中間(Tail)以…代表刪除部分

針對單行 Label 的Autoshrink設定研究:

Fixed Font Size : 固定 Font Size,不因label 寬度改變而使Font Size 改變
Minimum Font Scale : 針對初始 Font Size 因label 寬度改變而自動調整的最小Font尺寸比例。
Minimum Font Size : 因label 寬度改變而自動調整的最小Font Size。

彼得潘的 Swift iOS App 開發教室

學習 Swift iOS App 開發的學生作品集

)

Tim Tseng

Written by

Tim Tseng

彼得潘的 Swift iOS App 開發教室

學習 Swift iOS App 開發的學生作品集

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade