uitextview

Make a UITextView selectable but not editable?

Hi, I am implementing a custom keyboard in my app. The thing is, I want to make it selectable so I can use the selectedRange property to get where the cursor is at. However, the only way to allow the user to select text in a UITextView is to make it editable, which brings up the keyboard. Is there a way to hide the keyboard, or place a ...

Growing UITextView and UITableViewCell

I'd like to emulate the compose mail screen of Apples iPhone app. At this moment I have a UITableView with some cells. The last cell contains a UITextView. I managed to get the scrolling the way I like, but one problem remains: how to let the UITextView and the UITableViewCell automatically grow in height when the user enters a new line ...

How to embed a link in a UITextView for the iphone

Hello, I'm wondering if it is possible to put a hyperlink in a UITextView that will open up safari and take the user to a web page. And if so how can I accomplish this. Thanks in advance for your help. ...

How to make UITextView detect links for website, mail and phone number

I have a UITextView object. The text in UIView has a phone number, mail link, a website link. I want to show them as links with following functionality. When someone taps on URL - Safari should open the the website. When someone taps on email link - Mail should open up with my address in to field When someone taps on phone number - Phon...

textViewDidBeginEditing not firing due to zoom

I have a UIViewController subclass that is acting as the delegate for a UITextView. I implemented textViewDidBeginEditing to display a 'Done' button to dismiss the text view... all is well... except that when the text view has text and is not in edit mode, if a user holds a finger in the text view causing the text to be zoomed with the ...

iPhone Auto-scroll UITextView but allow manual scrolling also

I have a UITextView that has a lot of content. I have a button that allows the UITextView to automatically scroll + 10 pixels in an NSTimer loop: scrollPoint = CGPointMake(scrollPoint.x, scrollPoint.y + 10); [textView setContentOffset:scrollPoint animated:YES]; This works really well, as the animation makes the scroll rather smooth. ...

UITextView touch events not firing

I have a UITextView that I want to detect a single tap for. It looks like I would be fine with simply overriding touchesEnded:withEvent and checking [[touches anyObject] tapCount] == 1 , however this event doesn't even fire. If I override the 4 events like this: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UIT...

How to add a UITextView and UIActionSheet to UIScrollView/UIPageControl?

I am new to iPhone programming. I am trying to modify the PageControl example program to add a UITextView and UIActionSheet so I can display text on the scroll view of the page. This is how the "PageScrollView.h" looks like: @interface PageScrollView : UIView `` { UIScrollView *scrollView; UIPageControl *pageControl; U...

UIView doesn't resize to full screen when hiding the nav bar & tab bar

I have an app that has a tab bar & nav bar for normal interaction. One of my screens is a large portion of text, so I allow the user to tap to go full screen (sort of like Photos.app). The nav bar & tab bar are hidden, and I set the the text view's frame to be full screen. The problem is, there is about 50px of white space where the t...

Copy from a UITextView without having the keyboard showing

I display a UITextView that I want the user to be able to copy from but not edit. There must be no keyboard present on the screen during the copy. If I prevent first responder then the keyboard stays hidden. However this also prevents processing of events from touches that would allow a copy interaction. It also has to be editable to pr...

How to mimic a standard html text rendering on iphone?

I have a view with two UITextView elements in it, each of which is tied to an outlet in the controller. The content for these is coming from a database, and is sometimes short an other times long. I want it to look like it would in html, with <p>content1</p><p>content2</p>, such that the distances from the end of content1 to beginning o...

Detect when a user clicks the paste button in a UITextView

Hi, I am having quite a issue trying to change the cut/copy/paste behavior of the UITextView. What I want to achieve is: detect when the user has pasted some text into the UITextView. When I detect this I will then check the data and do my thing. According to the documents, I found out about UIResponder. So I created an simple clas...

Limiting pasted string length in UITextView or UITextField

The problem of limiting strings that are directly entered into a UITextView or UITextField has been addressed on SO before: iPhone SDK: Set Max Character length TextField iPhone sdk 3.0 issue However now with OS 3.0 copy-and-paste becomes an issue, as the solutions in the above SO questions don’t prevent pasting additional characters...

UITextView renders two layers

I'm having a problem wherein when I try to resize the frame when the keyboard shows, in a UITextView, the content from the previous frame remains visible, rendering the result unreadable. I'm wondering if anyone else has encountered this problem? More background: when the UITextView is rendered, I set its text to the contents of a file...

Scrolling UITextView programmatically

I'm implementing some simple text chatting capabilities in my app and I'm having issues with scrolling the UITextView programmatically. I'm using a UITextView created in Interface Builder that appends a new line and some text to the preexisting text. When the new text is added it should scroll to the bottom. I built a test application t...

Iphone sdk : Tab Character inside a textview

How can I display a Tab (\t) on a textview ? I have a small piece of code (Example Below) which is well formated with Tab's and new lines. But when I view this code on a text view it does not show the tab's, but it does show the new lines. @interface Animal : NSObject { NSString *name; NSString *description; NSString *ima...

How to stop UITextView from scrolling up when entering it

Hi, I have a UITextView included in a UITableViewCell. The layout is correct when the views are initially displayed, but once I click in the UITextView it automatically scrolls up a bit and the top half of the characters on the first line becomes invisible. This image is when the UITextView is not active: And this one is when I clic...

how to solve this intersting UITextView problem

Friends, I've a problem in moving the cursor to first location. I've an application which keep adding the note. When user press "edit" button, i am launching another screen and want to move notes existing text at the bottom of TextView while cursor is on the first location. This behavior is similar to email reply screen. Here email body...

How to control placement of paste menu in a UITextView in iPhone SDK

I have a UITextView placed just below a view containing an ad and when the user tries to paste in text the paste menu overlays the ad which is just above the insertion point. I don't want to encourage accidental clicks so I'm looking for a way to make the menu display below the insertion point instead of above it. Or maybe there's a way ...

iPhone OS 3.0 UITextView

OK, I'm having some problem with the UITextView. Here's the issue: I add some text to a UITextView. The user then double clicks to select something. I then change the text in the UITextView (programatically as above) and the TextView scrolls to the bottom of the page where there is a cursor. However, that is NOT where the user clicked. ...