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

if set contentInset ,the placeholder location does't start like input text . #78

Open
tanpengsccd opened this issue May 28, 2020 · 1 comment

Comments

@tanpengsccd
Copy link

image
code

text.contentInset = .init(top: 0, left: 20, bottom: 0, right: 20)
@VincentSit
Copy link

VincentSit commented Jun 8, 2020

self.placeholderTextView.textContainerInset = self.textContainerInset;

The code above shows that you need to use textContainerInset instead of contentInset.

$0.textContainerInset = UIEdgeInsets(inset: 11)
$0.placeholder = ...

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