chronotruck / FlagPhoneNumber

A formatted phone number UITextField with country flag picker.
Apache License 2.0
437 stars 318 forks source link

fix iOS 13 wrong layout, text and flags overlapped #112 https://githu… #114

Closed blacktiago closed 4 years ago

blacktiago commented 5 years ago

…b.com/chronotruck/FlagPhoneNumber/issues/112

MEnnabah commented 4 years ago

Any chance this can be merged? Maybe to another branch not master?

thlucena commented 4 years ago

Thank you for solving the issue! I had to add this piece of code manually because this has not been merged yet, so I hope this PR gets approved soon.

thlucena commented 4 years ago

@blacktiago I noticed that when changing the flag's width and height (like phoneNumberTextField.flagSize = CGSize(width: 48, height: 48)) it does not update the UI. Could you update the PR's branch to handle this case?

thlucena commented 4 years ago

I've tested this solution real quick. Sometimes when the text field is tapped the keyboard does not appear.

pauloec commented 4 years ago

This shouldn't be merged yet. I'm testing with an iPhone X, inside a tableViewCell and it doesn't solve the issue.

thlucena commented 4 years ago

There is a problem with this solution. When you input the whole phone number, the left view increases its width. Then, if you end editing the text field and tap it to edit again, the left view captures the touch and the text field does not become the first responder. I was able to notice this using Debug View Hierarchy.

Still, I am using a modified version of this PR's code while a real solution is not provided.

grifas commented 4 years ago

Can you test with the fix_layout branch ?

blacktiago commented 4 years ago

@pauloec @thiagocesarm I could try to fix it this weekend but I really need you to add a little xCode project with the issue on it. Thanks

thlucena commented 4 years ago

@grifas Hey, it works, thank you!

Could you guys add a little more space between the country code and the phone number? Screen Shot 2019-09-24 at 13 56 08

iuliajingoiu commented 4 years ago

checked fix_layout and seems to be working fine. Thanks!