RaviM RaviM - 1 year ago 99
Objective-C Question

Automatic scrolling in textview in ios 4.3 + iphone sdk

automatic scroll occurs in ios 4.3 , when textViewShouldBeginEditing method call.
I want to stop this automatic scrolling.
currently scroll goes upside.
Help me on this textview question.

Thanks in advance.

Answer Source
[txtview scrollRectToVisible:CGRectMake(0, txtview.contentSize.height-txtview.frame.size.height, txtview.frame.size.width, txtview.frame.size.height) animated:NO];

set this frame in textview begin editing. And set y position of textview txtview.contentSize.height-txtview.frame.size.height
in textview should change in characters.

It works..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download