UITextView Inside UIScrollView Scrolling Parent as Text is Entered

2 Solutions Collect From Internet About “UITextView Inside UIScrollView Scrolling Parent as Text is Entered”

I had similar issues with UITextView. It seems scrollEnabled property does not cancel autoscrolling. I have solved it by overriding setContentOffset: method.
The following preventScrolling flag might help:

@interface MyScrollView : UIScrollView
@property (nonatomic, assign) BOOL preventScrolling;

@implementation MyScrollView 
@synthesize preventScrolling;
-(void) setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
    if(!self.preventScrolling) {
        [super setContentOffset:contentOffset animated:animated];

you have set the wrong contentSize: of scroll view….

always set the content size according to content inside scroll view, if content height and width is greater than scroll view height and width then only increase the content size else put it the same as its width and height of scroll view

[self.mainScrollView setContentSize:CGSizeMake(4096, 4096)];

instead of it put this contentsize:

[self.mainScrollView setContentSize:CGSizeMake(mainScrollView.frame.size.width, mainScrollView.frame.size.height)];

may this will help you