Re: Tabs in TextView
Re: Tabs in TextView
- Subject: Re: Tabs in TextView
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sat, 16 Aug 2014 12:49:44 +0700
On 16 Aug 2014, at 02:00, Kyle Sluder <email@hidden> wrote:
> On Fri, Aug 15, 2014, at 11:07 AM, Gerriet M. Denkmann wrote:
>> I have a xib with a TextView, which needs just one tab.
>> Can this tab be set in Xcode, or do I have to do this programmatically,
>> messing with ParagraphStyle etc. ?
>
> Try setting it up in TextEdit and pasting it into IB. Or try the Copy
> Ruler menu item—but I don't know if IB's menus have a "Paste Ruler" to
> receive it.
Made a nice TextView (containing one line with one tab) and pasted it into Xcode → Attributes Inspector → Text View.
The resulting window has this line as it should.
But all further lines added via appendMutableString use the default ParagraphStyle.
Not very useful.
So I just made my own textAttributes with font and paragraphStyle and use:
let aas = NSAttributedString( string: s2, attributes: self.textAttributes )
textStorage.appendAttributedString( aas )
instead of:
let aas = NSAttributedString( string: s2 )
Kind regards,
Gerriet.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden