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

Resolve exclusionPath problem. #51

Merged
merged 4 commits into from
Jun 5, 2018
Merged

Resolve exclusionPath problem. #51

merged 4 commits into from
Jun 5, 2018

Conversation

polonez
Copy link
Contributor

@polonez polonez commented May 23, 2018

This PR resolves #48.
I am not familiar with objc, please review carefully.

`textContainer.exclusionPaths` in UITextView is not applied to its placeholder.

To resolve `exclusionPaths` issue, replace the label with textview and
and add observingKeys.
CGFloat height = [self.placeholderLabel sizeThatFits:CGSizeMake(width, 0)].height;
self.placeholderLabel.frame = CGRectMake(x, y, width, height);
self.placeholderTextView.textContainer.exclusionPaths = self.textContainer.exclusionPaths;
self.placeholderTextView.frame = self.bounds;
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should set textContainerInset to placeholderTextView as well. Tested on the demo project with:

textView.textContainerInset = UIEdgeInsetsMake(50, 0, 0, 100);

screenshot

@polonez
Copy link
Contributor Author

polonez commented Jun 5, 2018

ping

Copy link
Owner

@devxoul devxoul left a comment

Choose a reason for hiding this comment

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

Thanks!

@devxoul devxoul merged commit 13ed226 into devxoul:master Jun 5, 2018
@devxoul devxoul added this to the 1.3.0 milestone Sep 17, 2019
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.

exclusionPaths problem
2 participants