键盘弹出和回收通知

版权声明:青干欧阳技术博客 https://blog.csdn.net/qq_40598646/article/details/80689248
[[NSNotificationCenterdefaultCenteraddObserver:selfselector:@selector(jianpantanchu:) name:UIKeyboardWillShowNotificationobject:nil];
    [[NSNotificationCenterdefaultCenteraddObserver:selfselector:@selector(jianpanhuishou:) name:UIKeyboardWillHideNotificationobject:nil];

//键盘弹出
- (void)jianpantanchu:(NSNotification*)notification
{
    NSDictionary*info = notification.userInfo;
    NSValue*value = [info objectForKey:UIKeyboardFrameEndUserInfoKey];
    CGSizesize = [value CGRectValue].size;
    _backview.frameCGRectMake(0SCREEN_HEIGHTSTA_NAV_HEIGHT35*displayScale- size.heightSCREEN_WIDTH35*displayScale);
    
}

//键盘回收
- (void)jianpanhuishou:(NSNotification*)notification
{
    _backview.frameCGRectMake(0SCREEN_HEIGHTSTA_NAV_HEIGHT35*displayScaleSCREEN_WIDTH35*displayScale);
}

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭