开发者

How can I calculate the contentsize of UItextView in which the text are dynamically added………

I ve an UIScrollview开发者_开发问答 ,in which I ve placed UIImageView and UITextView..Here I add the data to the UITextView dynamically…I want to scroll both the image and the text at the same time .It works fine..I ve assigned the contentsize of the UITextView to the contentsize of the UIScrollView…..Since I am adding the data dynamically I can't use the standard values..Any samples to find the contentsize of UITextView????


UITextView is a subclass of UIScrollView. So you can directly use the contentSize method,

CGSize _contentSize = textView.contentSize;
float _height = _contentSize.height;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜