• 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: add crlf to UITextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add crlf to UITextView


  • Subject: Re: add crlf to UITextView
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 25 May 2011 14:50:11 -0500

On May 25, 2011, at 1:10 PM, koko wrote:

> I have set the text property of myUITextView.  Now I want to add more text that is preceded by a crlf.  I do this:
>
> m_notes.text = [m_notes.text stringByAppendingString:[m_backing objectAtIndex:index]];
>
> where objectAtIndex:index is @"\r\n\r\nText to add"
>
> The result is not what I expected ... \r\n\r\n appears in the text.
>
> How does one get crlf into a UITextView?

Why don’t you just let the text view store the text in its native format w.r.t line endings, and just convert to-from CRLF on import and export?

Charles_______________________________________________

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

References: 
 >add crlf to UITextView (From: koko <email@hidden>)

  • Prev by Date: Re: add crlf to UITextView
  • Next by Date: Re: add crlf to UITextView
  • Previous by thread: Re: add crlf to UITextView
  • Next by thread: Re: add crlf to UITextView
  • Index(es):
    • Date
    • Thread