-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add tests and rename Label -> Nantes #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excited for this!
Nantes/NantesLabel.swift
Outdated
context.scaleBy(x: 1.0, y: -1.0) | ||
|
||
let textRange = CFRangeMake(0, attributedText.length) | ||
let txtRect = textRect(forBounds: rect, limitedToNumberOfLines: numberOfLines) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] textRect
instead of txtRect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It collides with textRect(forBounds:
:(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed it to limitedRect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could always do let textRect = self.textRect(...
right?
There was an issue where if you set some custom attributes before setting attributedText on the label, it wouldn't keep those properties in the attributedString. Now when you set lineSpacing, and then set attributedText on the label, it'll pull the properties already setup and append them to the attributedString you're putting in.
Replace TTTAttributedLabel with NantesLabel.