• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tabs in TextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: I think I wrongly got "Switch case is in protected scope"
  • Next by Date: Re: I think I wrongly got "Switch case is in protected scope"
  • Previous by thread: Re: Tabs in TextView
  • Next by thread: How to troubleshoot "Code signing operation failed" error alert?
  • Index(es):
    • Date
    • Thread