Re: How can I "set tab stops" in a UITextView?
Re: How can I "set tab stops" in a UITextView?
- Subject: Re: How can I "set tab stops" in a UITextView?
- From: Gordon Apple <email@hidden>
- Date: Sun, 19 Dec 2010 18:01:20 -0600
- Thread-topic: How can I "set tab stops" in a UITextView?
Welcome to the lame world of UITextView. No styles, no attributes.
Obviously, Apple, Inc. has something better, as shown in Pages, but they are
not sharing it with the rest of us. Other than rolling your own with
CoreText (which I have partly done -- and it's not easy), the only
alternative I know of is Phitext <phiware.com.au>, also based on CoreText,
but it's not free. Hopefully, some future system upgrade will remedy this
deficiency.
On 12/19/10 2:01 PM, "email@hidden"
<email@hidden> wrote:
> I would like to be able to control what is displayed in a UITextView when the
> text contains a "tab" character. (I conjecture that if there is a mechanism
> to do that, it might be common to both UITextView and NSTextView, so if anyone
> knows anything about the latter, please speak up.)
>
> More specifically:
>
> Testing suggests that when there are tab characters in a text string being
> displayed in a UITextView, the system behaves as if "tab stops" were set every
> eight characters; that is, the next character after a tab is displayed at the
> next horizontal position that would correspond to it being preceded by a
> number of blank spaces that is a multiple of eight.
>
> Is there a way to make that position be a multiple of something other than
> eight? I do not need the full generality of completely adjustable tab stops,
> I just want to be able to change "eight" to another value.
>
> My work-around is to watch text as it is typed or pasted into the view and
> deal with tabs there, on my own, or I suppose that if I were a dedicated
> masochist I could in principle override a "draw" method somewhere, but it
> would be easier to use a built-in mechanism if there is one.
>
> I posted a query about this in the forums, and I have of course googled the
> usual suspects.
>
> Thanks.
>
> -- Jay Reynolds Freeman
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden