iOS 第三方键盘多次回调处理

来源:互联网 发布:annie古着香水淘宝 编辑:程序博客网 时间:2024/05/31 19:48


//            // 第三方键盘回调三次问题,监听仅执行最后一次

//            CGRect begin = [[[notification userInfo] objectForKey:@"UIKeyboardFrameBeginUserInfoKey"] CGRectValue];

//            CGRect end = [[[notification userInfo] objectForKey:@"UIKeyboardFrameEndUserInfoKey"] CGRectValue];

//            if(begin.size.height>0 && (begin.origin.y-end.origin.y>0)){

//                NSLog(@"contHeight is %ld", (long)contHeight);

//                NSLog(@"self.contentHeight is %ld", (long)self.contentHeight);

//                NSLog(@"duration is %f", duration);

//                

//                self.isKeyboardAnimating = YES;

//                duration = duration ? duration : 0.20;

//                

//                [UIView animateWithDuration:duration animations:^{

//                    self.frame = rect;

//                    self.contentHeight = contHeight;

//                } completion:^(BOOL finished) {

//                    _isKeyboardAnimating = NO;

//                }];

//            }


0 0
原创粉丝点击