簡體   English   中英

按鈕在iPhone SE中不顯示全文

[英]button does not show the full text in iPhone SE

我在view有3個buttons 所有按鈕均以相同number of lines顯示button title 即,如果1個按鈕以2行顯示文本,則其他兩個將顯示相同的文本。 這個問題主要是在使用iPhone SE's時影響到我。 它顯示如下

按鈕設計

這就是屬性檢查器的外觀

在此處輸入圖片說明

字體大小為-

在此處輸入圖片說明

像這樣做,

  1. 創建一個從buttoncontrollerIBOutlet連接。
  2. Ex : think your button outlet name is -> testButton
  3. 然后在viewdidload中:

      testButton.setTitle("Delete\\n Tender", for: .normal) testButton.titleLabel?.numberOfLines = 2 

希望這對您有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM