hi textview placeholder position
jjljiang155 opened this issue · 11 comments
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.
I will reopen this issue, and we will take a look at it this week, latest next week. Thank you!
@nodle-J @DanielDahan I see the issue..
@nodle-J thank you for your patience - I will keep this ticket up until we have a fix. 👍
@adamdahan is this happening only when we have Chinese characters?
@OrkhanAlikhanov So far, yes.
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
@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 :)
Linking the task issue: #1264