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

Problems when changing orientations #16

Closed
Idomo opened this issue Jul 9, 2018 · 13 comments
Closed

Problems when changing orientations #16

Idomo opened this issue Jul 9, 2018 · 13 comments
Assignees
Labels

Comments

@Idomo
Copy link
Contributor

Idomo commented Jul 9, 2018

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
@oleghnidets oleghnidets self-assigned this Jul 10, 2018
@oleghnidets
Copy link
Owner

Thanks. I will try to fix it asap :)

oleghnidets added a commit that referenced this issue Jul 15, 2018
#15 Placeholder overlay with set text when the text is set in Interface builder.
@oleghnidets
Copy link
Owner

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

BTW, did you use a height constraint?

@Idomo
Copy link
Contributor Author

Idomo commented Jul 15, 2018

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

@Idomo
Copy link
Contributor Author

Idomo commented Jul 16, 2018

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

@oleghnidets
Copy link
Owner

oleghnidets commented Jul 16, 2018

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

@Idomo
Copy link
Contributor Author

Idomo commented Jul 16, 2018

@oleghnidets Same problem...

@oleghnidets
Copy link
Owner

Sample.zip

For me it works.

@Idomo
Copy link
Contributor Author

Idomo commented Jul 16, 2018

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

@Idomo
Copy link
Contributor Author

Idomo commented Jul 16, 2018

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

@oleghnidets
Copy link
Owner

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

@Idomo
Copy link
Contributor Author

Idomo commented Jul 16, 2018

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

@oleghnidets
Copy link
Owner

Fix in 8df9d93

Release is coming soon :)

@oleghnidets
Copy link
Owner

Done in 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants