Read complete story

Convert HTML content to NSString in IOs.

 

HTML TO NSSstring

Sometimes we need to display  HTML data to UIlabel for this we have to change into NSString, otherwise, we have to use web view for displaying  data without loss of any original data.  when we display HTML content to UILabel then we have to calculate its length also otherwise we can’t set another view on the bottom of UILabel.

Example:

1: here htmlData contains your HTML content coming from the server.

2: calculate height of UILabel :    shortDescription.frame.size.height;

it will return actual height of UIlabel.

 

 

 

 

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close