How is the iPhone SMS compose view implemented? - iphone

Regarding the SMS compose view as show in the picture below:
alt text http://www.kennethlund.dk/wordpress/wp-content/uploads/2008/08/iphone_sms.jpg
I have two questions:
1) How is the text entry box implemented? There are no standard control from the API and the box is smart enough to resize when you press enter OR when the text is too long. Also the bar resizes with it. How is this done with the least coding?
2) How to code it such that when the keyboard shows up the whole view shifts up? Typically when the keyboard shows, it goes over your current view.

Searching stackoverflow for "uitextView size" produces these results:
How do I size a UITextView to its content?
Resizing UITextView
Searching stackoverflow for "keyboard iPhone" produces this result:
Programmatically align a toolbar on top of the iPhone keyboard

TTTextEditor is an autosize text box, which is part of the three20 framework

Related

Available height to position UI elements assuming keyboard always shows

I am encountering a problem that I'm not sure how to solve. If you look at the screenshot below, you'll see that the UI is laid out so that it neatly fits into the space between the safe area layout guide's top anchor and the top of the keyboard.
The keyboard will ALWAYS be shown in this view controller. But I need a way of knowing what the height of the keyboard is so that I can do some math to figure out how to tall to make the UITextView (the red box).
I tried the approach of registering for notifications on when the keyboard will show, but that is too late.
I need a way of knowing the height of the keyboard before the view renders so that I can configure the height of each of the elements in the UI.
Is there a way to do this?
Thank you!
One option would be to capture the dimensions of the Keyboard when it IS presented then pass those dimensions into this view.
However, you will also want to make sure that you are handling cases such as the split keyboard on an iPad and things of that nature.
For that you might choose to look at the documentation on using the keyboardLayoutGuide and use it with some constraints.
https://developer.apple.com/documentation/uikit/keyboards_and_input/adjusting_your_layout_with_keyboard_layout_guide

UITextField position is different on iPhone 5 versus older iPhone (3GS/4/4S)

I have a UITextbox on the bottom of my screen (which is the table you see in the graphic below).
On the iPhone 3GS/4/4S it shows up correctly on the bottom. However, on my iphone 5, it is on the same screen where it would normally be on a regular iphone, screenshot below:
Is there a way to resolve this through IB or must it be done with code?
You can see a bit of blank white space at the bottom where the last tab is cut off, it looks like its still reserving room for the input box.
In interface builder (where you're using strings & struts and NOT auto layout), you can change what you're looking at by selecting the view controller you want to work with and then, in the Attributes Inspector for the view controller, touch this pop-up menu:
iPhone 5 screen size:
iPhone 4 & earlier screen size:
You can then see the difference between the two iPhone screen sizes.
Now, to get the text field to hug (or stay aligned at the bottom), click the bottom strut for the text field. It should look something like this:

Scrollable, Clickable text in iPhone SDK

I'd like to make a text based app with clickable text in a scrollable screen. Can't seem to do it with TextView.
Let me explain: you open the app and there is a long paragraph. You scroll down and click on the word hammer (which is probably colored or bolded) and a small pop up window appears with a definition of hammer. How is this possible?
If you'd like to see an example, here is a youtube vid of somewhat similar functions in a bible app (though they don't use a pop up box): http://www.youtube.com/watch?v=qNCgePlBamQ
Any help would be appreciated
You could use a UIWebView and HTML
and this: iOS Clickable Words (UILabel or UIbutton's) was asked suspiciously recently

How do I change the frame of keyboard word completion view in iPhone?

Does anyone know how to change the word completion view's frame ?
The view appears when you type in some characters in a text view. but it always appears on the bottom of the character you type.
I found that iPhone message and Skype has put it to the top of the textView, how did they do that? should I define the keyboard myself or just implements some delegate methods?
From what I observe, the autocorrect suggestion is automatically positioned above the line where text is being typed if it is close enough to the on-screen keyboard, such that placing the suggestion below would cause the keyboard to obscure it.
My best guess is that this is determined and handled by the system and that there aren't any APIs to control where the suggestion appears, how to style it, etc.

Interface Builder: Is there a way to show the on-screen keyboard?

I want to check that my iPhone interfaces designed in Interface Builder look ok when the on-screen keyboard is shown. I know how to set the 'simulated user interface elements' such as the top and bottom tab bars on or off.
Is there anything similar for the on-screen keyboard?
Thanks!
You could start with a Horizontal Guide (Editor > Add Horizontal Guide) 216 px from the botton. That's exactly how high the keyboard is.
I am not certain but I believe the answer is no. You cab however, "Simulate Interface" and run the XIB file in the simulator, which should accomplish what you want.