#How to use
- Add the
.h
and.m
files to your project. - Import the
.h
file using:#import "UIView+FormScroll.h"
- Example usage for moving a view up and down when a text field becomes active and resigns the first responder:
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[self.view scrollToView:textField];
}
-(void) textFieldDidEndEditing:(UITextField *)textField
{
[self.view scrollToY:0];
[textField resignFirstResponder];
}
#Credits
Originally posted to StackOverflow.com by Dan Ray.
Improvements by Mark Rickert
#License
Public Domain