Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

UIView category that scrolls a view up or down. Useful for moving a view when you show a keyboard so that the view isn't covered up.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.markdown
Octocat-spinner-32 UIView+FormScroll.h
Octocat-spinner-32 UIView+FormScroll.m
README.markdown

How to use

  1. Add the .h and .m files to your project.
  2. Import the .h file using: #import "UIView+FormScroll.h"
  3. 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

Something went wrong with that request. Please try again.