oleghnidets / TweeTextField

Lightweight set of text fields with nice animation and functionality 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems when changing orientations

Idomo opened this issue · comments

commented

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
commented

Thanks. I will try to fix it asap :)

commented

Hi,
May you try pod 'TweeTextField', :git => 'https://github.com/oleghnidets/TweeTextField/TweeTextField.git', :branch => 'master' ?

BTW, did you use a height constraint?

commented

@oleghnidets I'll try it soon.
Not that I remember, Why?

commented

@oleghnidets The code didn't work, when running pod install it doesn't recognize the library (just not including it in the libraries list).

commented

Please, try this one pod 'TweeTextField', :git => 'https://github.com/oleghnidets/TweeTextField.git', :branch => 'master'

commented

@oleghnidets Same problem...

commented

Sample.zip

For me it works.

commented

@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.

commented

@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.

commented

Thanks a lot for your help.
I will change it.

commented

@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.

commented

Fix in 8df9d93

Release is coming soon :)

commented

Done in 1.3.1