-3

i tried to read HTML using NSAttributeString. but it gets incorrect result when i put table in li

<ol>
    <li>first 
        <table>
            <tbody>
                <tr> 
                    <td>hello</td> 
                    <td>: </td> 
                    <td>world</td> 
               </tr>
            </tbody>
        </table>
    </li>
    <li>second</li>
</ol>

and it becomes like this

enter image description here

i have used the other extension but it still doesn't work.

ex: Convert HTML to NSAttributedString in iOS

is it bug from swift? and if it's a bug is there any solution?

Benny Wijaya
  • 207
  • 3
  • 16

1 Answers1

0

Swift & HTML

First of all, think of what you want. If you want to get data from a web server, the best approach is to use PHP and (My)SQL.

Swift, not Objective-C

The link you provided uses Objective-C, not Swift, so it's likely not going to work. Also, when looking up things on the Internet, you should try to avoid old content, as Programming Languages change and get updated, so some things may get deprecated. Check this link for a swift tutorial.

luismiguelss
  • 155
  • 2
  • 16