I want to display html text on a label(TTStyleLabel). I am receieving text in form of html. How do I calculate height of html string?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
To get height of html text you need to put that html info uiwebview. After loading the html in uiwebview you can get its height in its delegate methods like this –
But if you are not displaying the text on the screen using the webview (as you are using a TTStyleLabel) you can hide the webview and load the html in it. You need to perform some tricks.