In iOS4 iPhone when the keyboard opens, some text fields can be hidden or clipped by the keyboard.
Instead, if there is a UIImageView, this is scaled, stretched, and so on.
Can you ensure that the UIImageView remains at the same place and is only, possibly, hidden, clipped by an open keyboard (as a UITextField)?
Thank you.
What happens when the keyboard appears is entirely up to you. If you want your image view not to move, don't move it.
Related
I am adding a custom keyboard to a view using inputView linked to a UITextField. I have set the size at Width 216, Height 320. I have it entering from the bottom on a portrait orientation. I want it to only cover 216 pixels of the screen but now when it comes up with the keyboard hugging the left side and has the correct aspect ratio. However there is a gray background that extends from the right edge of the keyboard to the right side of the view. Is there any way to remove this so it is clear and I can see the right side of the view? I have tried setting the background of the view to clear color and tried everything I can think of. Does anyone know if this is possible?
I guess you can't do it, because with keyboard opening the view moves up, so there are the "empty" rectangle in the 216x320 pts.
I placed UITextView for simple chat app.
But the auto-complete bubble was hidden by keyboard.
How can i place the auto-completion bubble on top of the UITextView's input?
I found the solution.
UITextView frame is bigger than original show size.
In the screenshot image, the UITextView frame is more bigger than one line size. (it was hidden by superview and keyboard)
So the bubble is placed below keyboard.
If we resize UITextView frame to one line size, then the bubble will be show on top.
Hi there I have a UIView with a bunch of UITextfields. My problem is that my UITextfields are present from the top to the bottom of my screen. So when the keyboard pops up, it covers half the screen and consequently the UITextfields below...What can I do so that all the fields can be edited by simmply scrolling when the keyboard is visible?
You need to embed your UIView into a UIScrollView and then change the size of the UIScrollView when the keyboard pops up.
Just give the view a new transform that moves it up. Eg.
[myView setTransform:CGAffineTransformMakeTranslation(0, -keyboardSize.height)];
Thats also animatable, just give it the same animation values as the keyboards and it will look perfect.
This solution is from XCode 5, iOS 7.0 and Storyboards. It worked for me quite well.
http://www.youtube.com/watch?v=4oCWxHLBQ-A
I have a modal view with a textview and a button. When the keyboard is displayed it covers up some of my UI elements. I'd like my modal to be scrollable so that it can be viewed while the keyboard is displayed. How can I do this?
I've had the same question, and i've played with it a bit,
setting a UIScrollView is not enough, as in the inspector
you should 1st. increase it Hight, then in the attributes, check the following checkboxes:
Scrolling enabled, Bounce Scroll, always bounce vertically.
Edited: Forgot the most inportant thing:
in the size inspector, set the Buttom field (under content) to the size you wish, (960 is twice the regular size)
Use a UIScrollView instead of an ordinary UIView. You can disable scrolling when you don't want the user to be able to with:
[theView setScrollEnabled:NO];
i create a new InputData.xib which has few text box which actually larger than iphone screen, but when i exe the app, text box which in beyond the iphone screen is hidden and i unable to scroll the screen, how this can resolve,
thanks
In general, the iPhone screen has a window that is of fixed size and position. All scrolling needs to be done with UIScrollView objects. UITextView is a subclass that works well for text. UITableView is for lists, like in the iPod app. UIScrollView itself can be used for anything else.
You should probably use a UITextView, rather than a UITextField. Make its bounds equal to the screen bounds; if there's more content than will fit, it will handle scrolling within it automatically.