I have a UIView that is pushed from offscreen to onscreen using the following code. The problem is, the keyboard is being loaded first, then the view, it is like they are two separate views being pushed into the screen.
What I want is for the keyboard and view to load together at the same time.
[UIView animateWithDuration:.5
animations:^{
[self.weightView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
}
completion:^(BOOL finished){
[weightTextField becomeFirstResponder];
}];
You should call the
becomeFirstRsponderin the “animation:” block, not the “completion:” block, so that the keyboard and the view are animated together, and not one after the other.