I have TTStyledTextLabel inside a UITableViewCell. The label loads a HTML string with references to web image resources. The problem I am facing is that once the image has been loaded the dimensions of the label need to be changed and hence the UITableViewCell.
Any idea as 开发者_JAVA百科to how this should be done.
Would appreciate any help. This has consumed a lot of my time.
Here is how I did it.
I scanned for all the text to see what images have to be downloaded. Once the images have been identified, i initiated their download using TTURLRequest. After the images were downloaded the sizeThatFits api returns the correct height.
This way is a bit slow, but solves the problem, until I am able to figure out a better way.
精彩评论