zoukankan      html  css  js  c++  java
  • textfield首行缩进

    #pragma mark - UITextView delegate Methods
    -(void)textViewDidChange:(UITextView *)textView{
        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
              paragraphStyle.lineSpacing = 30;    //行间距
              paragraphStyle.maximumLineHeight = 60;   /**最大行高*/
              paragraphStyle.firstLineHeadIndent = 20.f;    /**首行缩进宽度*/
              paragraphStyle.alignment = NSTextAlignmentJustified;
        NSDictionary *attributes = @{
                                     NSFontAttributeName:[UIFont systemFontOfSize:15],
                                     NSParagraphStyleAttributeName:paragraphStyle
                                     };
        textView.attributedText = [[NSAttributedString alloc] initWithString:textView.text attributes:attributes];
    }

  • 相关阅读:
    2021.3.3
    2021.3.2
    2021.3.1
    2021.2.28(每周总结)
    2021.2.27
    2021.2.26
    2021.2.25
    2021.2.23
    Redis系统学习之五大基本数据类型(List(列表))
    Redis系统学习之五大基本数据类型(String(字符串))
  • 原文地址:https://www.cnblogs.com/YH-Coding/p/5754290.html
Copyright © 2011-2022 走看看