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 8484323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:21:02+00:00 2026-06-10T20:21:02+00:00

In the Html class, Android has: public static Spanned fromHtml (String source) which according

  • 0

In the Html class, Android has:

public static Spanned fromHtml (String source)

which according to the documentation:

Returns displayable styled text from the provided HTML string.

.. and combining that with:

public void setText (CharSequence text, TextView.BufferType type)

which according to the TextView documentation:

Sets the text that this TextView is to display (see
setText(CharSequence)) and also sets whether it is stored in a
styleable/spannable buffer and whether it is editable.

.. makes it possible to display a string with HTML markup in a TextView ( example from this StackOverflow answer ):

String styledText = "This is <font color='red'>simple</font>.";
textView.setText(Html.fromHtml(styledText), TextView.BufferType.SPANNABLE);

My question is – what is the equivalent to this in iOS?

I have done some research, and it seems that people recommends using the UIWebView for this purpose – but is that really the only solution? And is it the recommended solution?

Thanks.

  • 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-10T20:21:03+00:00Added an answer on June 10, 2026 at 8:21 pm

    Apple itself recommends it, so it must be a quite good alternative solution…

    To display more complex styling in your application, you need to use an UIWebView object and render your content using HTML.

    If you really, badly don’t want to use UIWebView, you can use NSAttributedString objects and render one-line text using OHAttributedLabel.

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

Sidebar

Related Questions

Criteria class(http://developer.android.com/reference/android/location/Criteria.html) has power requirement criteria. But clearly not explained how exactly it works.
The new Android 2.1 SDK (version 7) has a new class called SignalStrength: http://developer.android.com/reference/android/telephony/SignalStrength.html
Starting at http://developer.android.com/training/index.html I selected the [ FIRST CLASS > ] button which takes
From: http://developer.android.com/resources/tutorials/views/hello-gridview.html , in ImageAdapter class: imageView.setLayoutParams(new GridView.LayoutParams(85, 85)); Look at the new GridView.LayoutParams
This is my CreateNotification class. Code has been taken from the android page. http://developer.android.com/guide/topics/ui/notifiers/notifications.html
Here http://source.android.com/source/code-style.html#follow-field-naming-conventions it is stated that : Field Names Non-public, non-static field names start
I have a sqlite table for my android application. This table has a String
I am using the android ViewPager : http://developer.android.com/reference/android/support/v4/view/ViewPager.html This class allows you to basically
I'm working on an HTML class in PHP, so that we can keep all
I'm trying to compare two numbers, and add an HTML class to the large

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.