logo
  • 教程列表
  • SO官方文檔
  • UITextView
    • 設定屬性文字
    • 改變字型
    • 自動檢測連結地址日期等
    • 改變文字
    • 更改文字對齊方式
    • UITextViewDelegate 方法
    • 更改文字顏色
    • 帶有 HTML 文字的 UITextView
    • 檢查是否為空或零
    • 獲取和設定游標帖子
    • 刪除額外的填充以適合精確測量的文字
  1. StackOverflow 文件
  2. iOS 教程
  3. UITextView
  4. 改變字型

改變字型

Created: November-22, 2018

迅速

//System Font
textView.font = UIFont.systemFont(ofSize: 12)

//Font of your choosing
textView.font = UIFont(name: "Font Name", size: 12)

Objective-C

//System Font
textView.font = [UIFont systemFontOfSize:12];

//Font of your choosing
textView.font = [UIFont fontWithName:@"Font Name" size:12];
  • 自動檢測連結地址日期等
  • 設定屬性文字

Copyright © 2018. All right reserved

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

  • 關於本站
  • 免責聲明