Open PaterB opened 12 years ago
I'm having this issue too. I may just modify the code myself to position the popup so that the keyboard doesn't block it.
I fixed this by moving the entire view up by first adding
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
[self becomeFirstResponder];
to viewDIdLoad then
- (void)keyboardWillShow: (NSNotification*) aNotification;
{
[UIView animateWithDuration:0.35
delay:0.0
options:UIViewAnimationCurveEaseOut
animations:^(void){
self.view.transform = CGAffineTransformMakeTranslation(0, -85);
}
completion:^(BOOL finished) {}];
}
and likewise for keyboardWillHide
Hope this helps!
When I have a textfield in the Pop, the keyboard will block my MJPop, how can i make it move up automatically ?