0

I see an entry here:

How to add bullets

It shows how to add bullets into IOS UITextField.

What I need is something different. I want to save the HTML code in the database like:

<ul>
     <li>item1</li>
     <li>item2</li>
</ul>

And then show it in IOS application as seen in the browser.

What is the good way of it?

Community
  • 1
  • 1
Burak
  • 5,706
  • 20
  • 70
  • 110

2 Answers2

0

I dont know if there is any such HTML interpreter/parser that will directly convert this code to NSString.

What I would suggest is that : Save the text in database as plane string with bullets or any prefix as <bullet>item1.

And while showing to the UI, first read that string from the database and replace <bullet> with some text as (dot buttlet, Unicode code point U+2022).

Or you need to use regex to convert your HTML tag and then replace <li> with

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
0

Am I missing something? Why not just UIWebView instead of UITextField?

Mike M
  • 4,358
  • 1
  • 28
  • 48