logo
  • 教程列表
  • SO官方文檔
  • UILabel
    • 建立一個 UILabel
    • 行數
    • 設定字型
    • 文字顏色
    • 尺寸適合
    • 背景顏色
    • 文字對齊
    • 計算內容界限(即動態單元格高度)
    • 標籤歸屬文字
    • 為文字新增陰影
    • 使用約束可變高度
    • LineBreakMode
    • 可點選標籤
    • 更改現有標籤中的文字
    • 自動調整大小標籤以適合文字
    • 未知文字長度的動態標籤框架
    • 證明文字
    • 嚴格根據文字和字型獲取 UILabels 大小
    • 突出顯示和突出顯示的文字顏色
  1. StackOverflow 文件
  2. iOS 教程
  3. UILabel
  4. 背景顏色

背景顏色

Created: November-22, 2018

迅速

label.backgroundColor = UIColor.redColor()

label.backgroundColor = .redColor()

Swift 3

label.backgroundColor = UIColor.red

Objective-C

label.backgroundColor = [UIColor redColor];
  • 文字對齊
  • 尺寸適合

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明