Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No effect on ios13 baselineOffset #44

Open
yugochen opened this issue Nov 7, 2019 · 1 comment
Open

No effect on ios13 baselineOffset #44

yugochen opened this issue Nov 7, 2019 · 1 comment

Comments

@yugochen
Copy link

yugochen commented Nov 7, 2019

in ios 13 attributedText baselineOffset no work

let testLabel = NantesLabel(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
let bigFont = UIFont.systemFont(ofSize: 14)
let smallFont = UIFont.systemFont(ofSize: 9)
let string = NSMutableAttributedString(string: "23", attributes: [.font: bigFont])
string.setAttributes([.font: smallFont, .baselineOffset: 5], range: NSRange(location: 1, length: 1))
testLabel.attributedText = string
self.view.addSubview(testLabel)

@XavierLost
Copy link

NSAttributedString.Key(rawValue: kCTBaselineOffsetAttributeName as String)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants