Problems when changing orientations
Idomo opened this issue · comments
What did you do?
Changed the device orientation to landscape
and back to portrait
when the TweeAttributedTextField
was in focus (when the keyboard is showing-up).
What happened instead?
The TweeAttributedTextField
height is increased by x2 and the placeholder became to the middle of the TweeAttributedTextField
.
What did you expect?
The TweeAttributedTextField
should stay the same and the placeholder should re-calculate it's position and be above the TweeAttributedTextField
.
Environment
- Library version: 1.2.2
- Xcode version: 9.4.1
- Swift version: 4.1.2
- Platform running (iOS version): 11.4
Thanks. I will try to fix it asap :)
Hi,
May you try pod 'TweeTextField', :git => 'https://github.com/oleghnidets/TweeTextField/TweeTextField.git', :branch => 'master'
?
BTW, did you use a height constraint?
@oleghnidets I'll try it soon.
Not that I remember, Why?
@oleghnidets The code didn't work, when running pod install
it doesn't recognize the library (just not including it in the libraries list).
Please, try this one pod 'TweeTextField', :git => 'https://github.com/oleghnidets/TweeTextField.git', :branch => 'master'
@oleghnidets Same problem...
For me it works.
@oleghnidets Now it's working!
The problem that I'm facing with now is that the placeholder label leading constraint is 0
so it's not looking good, may you change this to 8
so it will look better?
And one more important thing, Please wrap placeholder text with NSLocalizedString() so it will be localizable.
@oleghnidets suggestion about the spacing problem, maybe you should make the constraints equal to the UITextField.leftView
so it will be possible to add leftView
before the placeholder.
Thanks a lot for your help.
I will change it.
@oleghnidets I'v just fixed the spacing problems (not including the leftView problem), see #17
I'd like you to update when the localization will be implement.