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????
Asked
Active
Viewed 1,454 times
1 Answers
0
UITextView is a subclass of UIScrollView. So you can directly use the contentSize method,
CGSize _contentSize = textView.contentSize;
float _height = _contentSize.height;

EmptyStack
- 51,274
- 23
- 147
- 178
-
how can i assign the CGSize to content Size(content height is in float). – varth_FD Oct 12 '11 at 12:32
-
You can get *height* from *contentSize*. See my edited answer! – EmptyStack Oct 12 '11 at 12:41