Created
September 7, 2011 23:11
-
-
Save pashields/1202085 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)keyboardWillShow:(NSNotification *)notif { | |
if (self.scrollView.frame.size.height == 460-HEADER_BAR_HEIGHT-216) { | |
return; | |
} | |
[UIView beginAnimations:nil context:NULL]; | |
[UIView setAnimationDuration:0.2]; | |
self.scrollView.frame = CGRectMake(0, HEADER_BAR_HEIGHT, 320, 460-HEADER_BAR_HEIGHT-216); | |
[UIView commitAnimations]; | |
NSLog(@"contentOffset: %f", self.scrollView.contentOffset.y); | |
if ([self.lastNameField isFirstResponder]) { | |
CGPoint point = CGPointMake(0, 207); | |
self.scrollView.contentOffset = point; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment