Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:16:00+00:00 2026-06-14T21:16:00+00:00

I need to render an (arbitrarily large) NSAttributedString , in this case ANSI-colored text

  • 0

I need to render an (arbitrarily large) NSAttributedString, in this case ANSI-colored text from an (arbitrarily long) telnet session. The text need not be editable inline. I have explored a few options:

  • UITextView seems to have by far the best performance and, since I’m targeting iOS 6, it’s very easy to use with attributed strings. However, the textview gets progressively slower to render as more text is added, as it hits an HTML DOM parser each time I call setAttributedString: and blocks the UI.
  • I’ve tried a few core text rendering frameworks, TTTAttributedLabel and OHAttributedLabel, that also get progressively slower with more text. To be fair, they’re labels probably not intended for this sort of thing!
  • UIWebView (gag) has some issues with rotation and keeping the text properly sized and framed, but I think I could work around it. I can convert my attributed string to HTML and use JavaScript to append (inject) new text as it is received. Surprisingly good performance here.
  • A friend suggested I think of the user’s current scroll position as a viewport into a larger document and (probably with core text) render only the visible part of my attributed string. I’m worried about how this might impact scrolling performance.

So I turn to you, brave interwebs. Ideas for an indie developer? Is a webview my best bet?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:16:01+00:00Added an answer on June 14, 2026 at 9:16 pm

    You could use a UITableView and split the NSAttributedString into an array of substrings that would each fit a cell’s label width. The table view’s data source would index into the array of substrings to determine which line of the original string should be placed in each cell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a game in python with pygame and need to render text onto
I need to render wikitext (pulled from the database of a mediawiki of it's
I need to render a partial in a controller, but not as the response
I need to render lookup field from a list as a link with popup
I have a workflow where I need to render an exception page. But this
I need to render a twig template from a command class in symfony2. namespace
I need to render an HTML element in rails, depending upon whether a session
I need to render a specified number of elements from an XML source, where
I need to render a unordered list with the data obtained from database using
I need to render some Rich Text in the screen that needs to change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.