3

Want to Search this Issue on Google But Do't Know What i need to write for find the exact reason So i am here.

ISSUE Create UITextField using Interface Builder and Run the project and while i am entering any value using iOS Keyboard this is what happening and i am confuse.

This Happened in One Project and as i created new one everything working fine.

Very First Time When App Started on Simulator.

Then I Entered single character G using iOS Keyboard

enter image description here

Then I Entered Again single character G using iOS Keyboard

enter image description here

Again single character G using iOS Keyboard

enter image description here

Again single character G using iOS Keyboard

enter image description here

what is the up down up down going here its totally strange but facing this problem.

You can review the Youtube Video

Please if anyone know about it share.

thanks

Buntylm
  • 7,345
  • 1
  • 31
  • 51

4 Answers4

2

I had the exact same issue. Didn't have this in a previous release of my app 2 weeks ago.

I've found that the issue is coming from presenting a view controller embedded in a navigation controller with a translucent navigation bar.

I set opaque bar in the simulated metrics of the navigation controller I was presenting and no more issue with UITextField.

On my case at least, everything were resolved at the moment I set opaque bar for top bar in simulated metrics in InterfaceBuilder for my UINavigationController which embed a UIViewController I've wanted to present modally

Hope it will be the same for you as well.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Razmog
  • 91
  • 5
  • +1 Yes if i set `opaque bar` on my `UINavigationViewController` Everything Work fine But I do't want to use it as i need `Top Bar` == `None` is there any solution related to this ? – Buntylm Mar 28 '14 at 11:06
1

Same problem just arrived here, and I reached this post via Google. In my case, the UITextField was added in a xib, in a view controller presented modally, and I needed the navigationbar to remain translucent.

So the only workaround I found was to remove the outlet from XIB, and add it programmatically in viewDidLoad method.

That did the trick.

Gougou
  • 387
  • 2
  • 8
  • Yeah that is what i tried after `Ramzog` answer and thanks for posting this as an answer. Good luck – Buntylm Jun 19 '14 at 17:15
1

In my case it was when UITextField was added as first element of UI. I worked with StoryBoard, so I put another element (UIButton) to first position and problem disappeared.

enter image description here     enter image description here

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Igor
  • 12,165
  • 4
  • 57
  • 73
1

Maybe the solution is this: func textFieldDidEndEditing(textField: UITextField) { textField.layoutIfNeeded() }

taken from here:

Text in UITextField moves up after editing (center while editing)

Community
  • 1
  • 1