dynamic height for UIScrollView
I have a UIScrollView
inside my UITableViewCell
. I have a NSAttributeString
inside this displayed (I am using this framework. Basically what I want to do is to adjust the size of the cells and the UIScrollView as well.
If the text in the NSAttributeString
can fit in a UIScrollView
less than 500, then the UIScrollView
gets that height. Otherwise let the UIScrollView
height's be 500.
Now the problem is that it gets more complicated than that. The NSAttributeString
is an HTML and so it's hard to estimate the height of the row just by treating the HTML as strings as it can have image etc. So is t开发者_C百科here a way to go around this, so I can set the height of each row dynamically according to the content of the UIScrollView
...
I was also looking for this kind of thing. Someone suggests me to get height using UIWebView when page loads get heigh by some javascript. Here is the original question
How to calculate height of html string?
精彩评论