uitextview

Discrepancy between sizeWithFont:constrainedToSize:lineBreakMode: and textView.contentSize.height

Hello, I am using the method [string sizeWithFont:constrainedToSize:lineBreakMode:] to estimate the height of a textView that I am resizing. However, it seems to consistently return the incorrect size. To debug, I wrote the following code: self.textView.font = [UIFont systemFontOfSize:14.0]; // It was this before, anyways NSLog(@"Real ...

can I put a scrollable text field on a uialertview?

I am needing to alert something for an answer for a trivia game iOS app I am writing. I have an alert view that pops up and shows a scrollable uitextview...is Apple going to ding me for that? What are my options for showing large amounts of text in my alert? Thanks!! ...

Embedding a UITextView in an image

I have a UIImageView displaying a picture that I took with the iPhone Camera. On top of that, I have a UITextView in which the user can type stuff that describes the picture. I would like to create a combined image of the two views and send it to a server. Anyone knows how I can do that (just creating the image. I know how to send it)...

UITextView with Syntax Highlighting

I've found a question on this already but it didn't have a complete answer to it. Is there a Framework or Library that can do Syntax Highlighting in a UITextView, specifically syntax highlighting (and detection) for Objective-C on the iPhone. Some of my Ideas of how to do this: NSAttrbutedString. Now available in iOS 3.2 and greater...

Position cursor to end of text in uitextview and scroll to position

Using the code below, I put text from a plist into a textView. The textView is not yet firstresponder; the text is initially for reading only. In iOS4 the goToEndOfNote code positions the cursor at the end of the text AND scrolls to that position. In 3.1.3 it doesn't scroll to the end until the screen is touched (which isn't required ...

Detect address from UITextView and show it map on tap

There is an option in UITextView properties to detect address from the the text view text. However I am not able to do that. The text view is not in editable mode. Do you know how to detect address from text view? Is there a format that the address must have to be detected from the text view? ...

Cursor position in a UITextView.

I am looking for a non private way to find the position of the Cursor or Caret (blinking bar) in a UITextView preferably as a CGPoint. There may be a question like this already but it does not provide a definitive way for doing it. And, I do not mean the NSRange of the selected area. ...

Simple UITextView crashing

I'm trying to use a simple UITextView in a basic view, but it causes the app to crash sporadically. Sometimes it crashes while I'm typing something in it, sometimes when I'm scrolling, sometimes after I hit the return key. From the stack trace, it looks like it's being caused by graphics or animation related code for rendering UI element...

UITextView alloc crashes application on iOS4

Hi all, I'm absolutely stumped at this. My properly working application [on iOS<=3.1] was crashing on iOS4. When I tried debugging it, I saw it's crashing at this line: EDIT: I tried changing the position of this statement and put some log statements to check and I could confirm that the application is crashing just at this line. This...

Remove Bottom Space From UITextView

UITextView adds a little extra space to the bottom of the text. This isn't an extra line of text, but space that effects scrolling. Is there any way to remove this space? I have attempted to use contentInset, contentOffset and contentSize but they all seem to have no effect. ...

Adding a line break to a UITextView

Hi I have a UITextView that takes an NSString with formating stringWithUTF8String. It is getting its values from a database and I want the text in the database to be rendered with breaks within the text. I tried using "\n" to do this but it gets rendered as text. Doing this in my information page of the app as straight text worked but I...

Which text rendering framework should I use?

Hi all, I'm currently scoping out a project for the iPad which is rather text and font heavy. There are many pages of styled text, which also need custom fonts. I have toyed with the idea of simply rendering PDF or PNG files on-screen, but I think we need to be able to dynamically repaginate the text. We've used UIWebView in a previous...

How to repaint a UITextView for iPhone 3.x after updating data programatically

In my app I update a textView progamatically. I actually loop through a dataset from a SQLITE3 DB and show a specific text for a given time. Then I would like to show the text from the next dataset record and so forth. I have been browsing through all kind of forums and the apple doc as well, but could not find anything like a repaint, r...

[iOS] The same number of characters in each line of UITextView?

Hi I'm developing a simple writing program using UITextView to study Cocoa programming. In UITextView, each line has different number of characters. I tried to change fonts of UITextView, but the width of each character seems to vary. For example, l and L has different width. Is there anyway to keep the same number of characters in each...

the behavior of UITextView like Submit Review on iTunes App

Hello all, I want to implement the behavior of UITextView like 'Submit Review' menu on iTunes App. On 4th row (Review (Optional)), I think that is a UITextView inside UITableView, am I right? So, if UITextView reach third text line, all of view will scroll, how to do that? I will appreciate your answer, thank you. ...

How can I count characters UITextView shows?

Hi all how can I learn total number of characters a UITextView shows in its specific contentSize after UILineBreakModeWordWrap applied. I will use different strings everytime as the text of UITextView. The strings are much longer than UITextView with its specified area can contain. The visible characters will be different for every di...

UITextView delegates problem

Hi, I am trying to access the UITextView delegates and have a problem I have a UIViewController with the UITextViewDelegate protocol and a Nib containing the textView. If I set the delegate inside viewDidLoad like "textView.delegate = self" and I touch the textView, the app crashes without logging errors. If I start editing the textVi...

Editable, customizable UITextView in UIAlertView

EDIT: Not really a problem, I did a typo. It actually works just fine :) Original question: Hey. I'm trying to place a UITextView in or on top of an UIAlertView. I know that the UIAlertView automatically uses a UITextView if message of the alert is too long, but I want it to always be an UITextView, and I want it to be editable and ...

custom uitableview like uitextview

I want to create a custom table view. In the table view the user should enter the username and password and other fields.In other words the table view should behave like a uitextview. I couldnt find a good tutorial for achieving the functionality i require. ...

Handling UITextView Data inside a Table View

Hey folks, i have this MainViewController, which is a controller for my table view. Whenever I press a row on the table view i go to my employeeViewController. Which is a normal view with a Text View inside of it. So my hierarchy looks like this: -Window --Navigation Controller ---Navigation Bar ---Main View Controller ----Table V...