DKHandleScroll keeps track of the keyboard frame, and lets you manage your scroll view insets along with custom views' frames the easy way, handling animations completely transparently for you. It will also help you scrolling down your scroll views with the keyboard when appropriate.
Just add these files
- DKHandleScroll.h
- DKHandleScroll.m
- UIResponder+FirstResponder.h
- UIResponder+FirstResponder.m
#import "DKHandleScroll.h"
Add the following code in viewWillAppear
-(void)viewWillAppear:(BOOL)animated
{
// Just Add instance of scrollView
[[DKHandleScroll sharedInstance] makeScrollable:_mainScroll];
}
For Swift
- Simply Drag and Drop SwiftScroll.swift file in your project
- Add
SwiftScroll.sharedInstance().makeScrollable()