Search code examples
iphoneuiscrollviewuitextviewframeuitextviewdelegate

UITextView Problem with scrolling text


enter image description here

I am using UITextView in above screenshot. But problem is when I am trying to scroll text its getting out of screen of UITextView. I have tried by reducing TextView frame but doing that its reducing UITextVIew Frame...

How can i maintain same UITextView height and my text also not go out of the frame ?


Solution

  • I would try to change the table view content size:

    [textView setContentSize:CGSizeMake(width, height)];
    

    Set width and height so that the whole text view fits inside that text view. Also check that the scroll is enabled inside of the text view; if it is not then set it:

    textView.scrollEnabled = YES;
    

    Hope it helps! ;D