views:

83

answers:

2

Hello all,

I'm already pretty sure that it can't be done with any public API, but I still want to ask:

Is there any way to change the line height in a UITextView?

Would be enough to do it statically, no need to change it at runtime. The problem is that the default line height is just WAY too small. Text will look extremely compressed and is a nightmare when trying to write longer texts.

thanks, Max

EDIT: I know that there is UIWebView and that it's nice and can do styling etc. But it's not editable. I need a editable text component with acceptable line height. That thing from the Omni Frameworks doesn't help either, as it's too slow and doesn't feel right...

A: 

According to Apple's Documentation you can use a UIWebView.

This class does not support multiple styles for text. The font, color, and text alignment attributes you specify always apply to the entire contents of the text view. To display more complex styling in your application, you need to use a UIWebView object and render your content using HTML.

Jordan
Well. But that view is not editable and thus no option for me...
Max Seelemann
It is if you intercept the tap on the WebView, show a UITextView on top, edit and save into the UIWebView ;)
Jordan
right, but as the primary usage is while editing this still is not the best option. And there's another problem: It's very very hard (if at all possible) to manually place the insertion point in a UITextView upon an event. This, however, would be needed to switch views. :(
Max Seelemann
A: 

The only solution we've found and the one we've chosen: create a custom font. Sound silly but seems to be the only realistic way.

Max Seelemann