Swift 卡住設定UILabel、UIButton

設定的小技巧

畫面漂亮很重要,但是有時候就是下指令後,

UI就是不耍你,這裡有二個類似的方法。

環境Xcode12.2 , Swift5.x

  1. 改變Label的字大小,發現在storyboard設定無效後使用程式碼設定

經過實際測試, 上面的方法有效,下面沒有反應。

2. UIButton 依照狀態字串

經過實際測試, 上面的方法有效,下面沒有反應。

快去試試看吧 我要和美術調整畫面了。

--

--

Major in physical education. Football referee. And high interest in looking the world through the numbers.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mario tsai

Major in physical education. Football referee. And high interest in looking the world through the numbers.