uitextview

How do you launch a UITextView (iPhone) in edit mode?

I'm working on an iPhone app with only one view, a UITextView, and I want it to launch all ready for typing (with the keyboard activated) but by default it requires the user to first tap the view before the keyboard appears. I've seen this done in other applications but haven't been able to figure it out. Thanks. ...

(iPhone) How to handle touches on a UITextView?

I'm trying to handle touches on a iPhone's UITextView. I successfully managed to handle taps and other touch events by creating a subclass of UIImageViews for example and implementing the touchesBegan method...however that doesn't work with the UITextView apparently :( The UITextView has user interaction and multi touch enabled, just to...

How can I implement an autoselection textbox like the one for e-mail addresses on the iPhone?

On the iPhone's mail app, you can type in multiple mail addresses...and then to delete one you just tap it, and click Del. How can I implement something similar in my app? I tried to handle the tap on a UITextView, but it looks like the touchesBegan and related delegate methods are not fired for this class and its subclasses :( Any idea...

Getting cursor position in a UITextView on the iPhone?

Hi all We have a UITextView in our iPhone app which is editable. We need to insert some text at the cursor location when the users presses some toolbar buttons but can't seem to find a documented (or undocumented) method of finding the current location of the cursor. Does anybody have any ideas or has anybody else achieved anything si...

(iPhone) selectedRange for a non-editable UITextView (or other methods of click handling?)

Hello all, I'm using an UITextView to hold static content (in Chinese, which means that the characters are all fixed width). I want to let users click on a character in the text and bring up dictionary information for that character. I know all of the issues surrounding the lack of copy and paste and all that, but I'm hoping that there ...

iPhone UITextView position relative

Hi, i got a news page (a view) at my application and it has news' image and text. Text is in a UITextView and i want my text to start next to image and when the image ends continue from the down of the image, like the text is surrounding the image. i tried autoResizingMask but as i ve understood it is for the relations between subview a...

How to dismiss keyboard for UITextView with return key?

In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'. I can add a button and use [txtView resignFirstResponder] to hide the keyboard. But is there a way to add the action for the return key in keyboard so that I needn...

Resizing UITextView

I have a UITextView added on my UIView. The textview added is not editable, it is just to display some data. The data displayed in the textview is dynamic. Thats is the number of lines is not fixed. It may vary. So if the number of line increases, the size of the textview also needs to be increased. I have no clue how to do this. Please ...

How to lose margin/padding in UITextView?

Hello, I have UITextView view in my Iphone application which displays large text and I am paging that text with offset margin, but the problem is, that it has some kind of margin or padding and it messes up my calculations (it seems to be diffferent depending on font style). Is it possible to get rid of that unnessecary space around UI...

How to get UITextView to respect newlines in Interface Builder?

I have a simple app with a UITextView embedded into a UIScrollView. Interface Builder won't let me add multiple newlines for spacing; when I hit return it sees that as "end of input" rather than appending the newline to the UITextView. How can I get it to accept newlines for spacing? ...

Stop UITextView from jumping when programatically setting text

Hi there, I have to update a small amount of text in a scrolling UITextView. I'll only be inserting a character where the cursor currently is, and I'll be doing this on a press of a button on my navigation bar. My problem is that whenever I call the setText method of the text view, it jumps to the bottom of the text. I've tried using c...

UITextView and UIPickerView with its own UIToolbar

I like to replicate the form behavior of Safari on the iPhone in my own app. If you enter data in an web form you get a separate UIToolbar (previous, next, done) just above the UIKeyboardView. Same for choosing an option: you get the same UIToolbar just above an UIPickerView. I am looking for demos / sourcode / ideas how to implement th...

iPhone - Problem with UITextView

This is probably an easy thing to do, but I just can't figure it out - how do I end editing athe textview? how can I get the keyboard to disappear? or do I have to click outside it to make it go away? ...

Giving swip event to other control

I have a UITextView on top of a UIView. They are in a PageScrollView. The user can swipe anyhere outside of the UITextView and flick over the next page (view). I'd like the user to swipe on the UITextView and flick over the next view as well. The UITextView scrolls vertically when there is to much text, which the user can swipe and...

Editable TextView with Second NavBar - Text appears, but too late.

Editable TextView with Second NavBar - Text appears, but too late. The app has a single Navigation Controller. I have an iPhone App that has basically three levels. Level 1 - Table with category Names Level 2 - Table with list of items for selected category Level 3 - Tabbed View with several views, including UITextView for details of i...

Contents of UITextField and UITextView to NSString

I have a UITextView and 2 UITextField set up. UITextView resigns first responder status when empty part of the screen is tapped, the same for the 2 UITextField, plus for these 2, the return key also resigns first responder status. All 3 are declared in interface. I would like to get the contents of all of these to individual NSString an...

Encoding spaces in UITextView / UITextField to URL format

I'm trying to send the contents of UITextView or UITextField as parameters to a php file NSString *urlstr = [[NSString alloc] initWithFormat:@"http://server.com/file.php?name=%@&tags=%@&entry=%@",nameField.text, tagsField.text, dreamEntry.text]; When i log urlstr, the url format is ok just as long as the UITextView or UITextFi...

Adding UITextView as subview in UIView then to UIScrollView

I have a UIViewController (ContentViewController ) wired to a View xib. I drop a TextView on the UIView and it appears as a subview in the hierarchy in IB. ContentViewController has a label as an outlet, which is wired to a label on ContentView.xib. When the code below executes, the first view shows the text view but scrolling through...

UITextView is being cutting off top half of top line of text.

So I have a UITextView that is cutting off the text in the top line. and each subsequent return takes the next line to the same position where it is cut off. I cant see how this is happening following is all the configuration that i have set for the object. ResolveNotes = [[UITextView alloc] init]; ResolveNotes.backgroundColor = [UI...

Preventing sqlite from escaping backslash

I have a varchar column in an sqlite datbase. A particular row of text has a backslash, which is used with "\n" for a carriage return in a UITextView. When the value is read from the database via a SELECT: myobject.text = [NSString stringWithUTF8String: (char *)sqlite3_column_text(selectstmt, 2)]; The backslash is escaped and looks ...