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

hi textview placeholder position #1256

Closed
jjljiang155 opened this issue Aug 22, 2019 · 11 comments
Closed

hi textview placeholder position #1256

jjljiang155 opened this issue Aug 22, 2019 · 11 comments

Comments

@jjljiang155
Copy link

I try to add textview in view
7CFB6591-888E-4944-BC45-D817020B0A88

@daniel-jonathan
Copy link
Member

Hi, please add more details, code, and the actual problem you are facing. Thank you! We would be happy to help when we have that information. Until, I will close this issue.

@jjljiang155
Copy link
Author

jjljiang155 commented Aug 26, 2019 via email

@daniel-jonathan
Copy link
Member

I will reopen this issue, and we will take a look at it this week, latest next week. Thank you!

@adamdahan
Copy link
Contributor

@nodle-J @DanielDahan I see the issue..

Screen Shot 2019-09-08 at 8 34 14 AM

@adamdahan
Copy link
Contributor

@nodle-J thank you for your patience - I will keep this ticket up until we have a fix. 👍

@OrkhanAlikhanov
Copy link
Contributor

@adamdahan is this happening only when we have Chinese characters?

@adamdahan
Copy link
Contributor

@OrkhanAlikhanov So far, yes.

@jjljiang155
Copy link
Author

It is Font less than 17 ,I think
In TextView
func layoutPlaceholderLabel()
var h = placeholderLabel.sizeThatFits(CGSize(width: w, height: .greatestFiniteMagnitude)).height
h = max(h, minimumTextHeight)
h = min(h, bounds.height - insets.top - insets.bottom)
placeholderLabel.frame = CGRect(x: leftPadding, y: insets.top, width: w, height: h)

I don't understand h, I set font less than 17 but minimumTextHeight is constant 。

I canceled this code .

h = max(h, minimumTextHeight)
h = min(h, bounds.height - insets.top - insets.bottom)

Its all right

I have just learned swift
if I am wrong,please forgive me

thanks

@adamdahan
Copy link
Contributor

@nodle-J We have started an internal conversation to re-write this component. For now a simple fix would be to set the

Line 326.
  internal let minimumTextHeight: CGFloat = 0

For your specific use case.

We will push a fix soon that's more appropriate for everyone!

Thank you for submitting this issue and getting us to notice :)

@daniel-jonathan
Copy link
Member

Linking the task issue: #1264

@jjljiang155
Copy link
Author

jjljiang155 commented Sep 11, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment