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.
Related
When I increase the frame of UITextView based on content size programmatically in keyboard hide notification delegate method,
The textview height is increased perfectly.But when I touch the UITextView bottom line, the keyboard is not coming.If i touch the area which was before
increasing frame or in actual first frame area, the keyboard is coming.How can I enable userinteraction in all area of UITextView?
Textview is as scrollview<---view1<---view2<---UItextview
Even If i increase the height of view2 and UItextview in xib, the same problem is coming.
I have disabled scrolling facility of UITextview
After increase the height of your UITextView write this bellow line , may be its problem that some view is front of UITextView...
[self.view bringSubviewToFront:yourTextView];
I am trying to scroll text in UITextView manually up and down with the help of uibuttons.
This is how I am doing.
[storyTextView setContentOffset:CGPointMake(storyTextView.contentOffset.x, scrollPoint-scrollFraction) animated:NO];
Where
scrollPoint=storyTextView.frame.size.height;
When I scroll up or down, text goes cut off.
See this image:
A UITextView clips it's subviews by default, so either you resize your UITextView to fill as much as you want, or you uncheck "Clip Subviews" in your xib, or with code
[storyTextView setClipsToBounds:NO];
Try this
[storyTextView setContentInset:UIEdgeInsetsMake(5, 0, 5, 0)];
Ok the problem is like this.Your font size is large and mathematically you are setting up the content offset but only depends on the textview frame not the contents height.
Solution is to find out a proper algorithm to get the contents properly visible and then apply the content offset and then move with that specific height such that the text appears correctly.
I have an iPhone screen (see attached image) where the UITextView fills almost the entire screen. When the user taps in the control the keyboard is displayed and text can be entered. However, when the text reaches the level of the top of the keyboard the UITextView does not scroll the entered text up. The result is you can not see the remaining text that is entered. Swiping up in the UITextView does not scroll the text up either. Scrolling is enabled in the UITextView.
How do you get the UITextView to automatically scroll as the text entry reaches the level of the top of the keyboard?
The UITextView scrolls automatically when text reaches its own height limit not keyboard or another object blocking the UITextView.
Maybe you can resize your UITextView when it becomes first responder to be of the height visible on the screen and resizes back to take the whole screen when it resign been first responder.
I want my UITextView to show text but not have the text be as wide as the screen. The problem I face with this, however, is that I want the scrollbar to be in the position it's in now. I'm unsure how to do this. Here's an image of the text i want bringing in, to show you what i mean a bit more clearly:
You can customize the position of the text using the contentInset, contentOffset and contentSize properties of UIScrollView (which is the superclass of UITextView).
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.