Skip to content

writingDirection 取值规则 #1

Description

@lhp3851

writingDirection这里原文[https://developer.apple.com/documentation/foundation/nsattributedstring/key/1524497-writingdirection]描述:

The value of this attribute is an NSArray object containing NSNumber objects representing the nested levels of writing direction overrides, in order from outermost to innermost.

这里应该是一个NSNumber的数组,代码修改如下:

let dict = [NSAttributedStringKey.writingDirection:[index]]
let attrStr = NSMutableAttributedString.init(string: self.titleStr, attributes: dict)
label.attributedText = attrStr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions