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

Update label constraints when textContainer.lineFragmentPadding changes #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markterluun
Copy link

@markterluun markterluun commented Nov 29, 2019

I noticed that the constraints were only updated after updating the textContainer, not after updating textContainer.lineFragmentPadding and decided to make a fix for it.

Copy link

@rtemple6 rtemple6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on these changes.

When trying to initialize new instance of KMPlaceholderTextView w/o lineFragmentPaddingObserver, the placeholder inset does not update.

private lazy var messageTextView: KMPlaceholderTextView = {
   let view = KMPlaceholderTextView()
   view.textContainer.lineFragmentPadding = 0
   return view
}()

Before
Screen Shot 2020-08-04 at 12 18 15 PM
After
Screen Shot 2020-08-04 at 12 26 48 PM

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

Successfully merging this pull request may close these issues.

None yet

3 participants