开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜