How do I add tab stops to an NSAttributedString and display in a UITextView

后端 未结 4 1896
一整个雨季
一整个雨季 2020-12-30 13:00

I\'m creating an iOS app, and I would like to display an attributed string with specific tab stops specified in a UITextView. I would also like to draw them directly into U

4条回答
  •  一个人的身影
    2020-12-30 13:26

    ios 6.1 added NSParagraphStyle but it seem the CTParagraphStyleRef and NSParagraphStyle are not toll free bridging.

    As result if you have CTParagraphStyleRef in NSAttributeString it causes:

    [__NSCFType headIndent]: unrecognized selector sent to instance xxxx

    and other methods for NSParagraphStyle such as alignment.

提交回复
热议问题