UIPOpovercontroller被抬高压缩的问题,可以通过添加对键盘的监听:
首先,在viewdidload中监听键盘出现的动作
[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(keyBoardWillShow:)name:UIKeyboardWillShowNotificationobject:nil];
然后,在有了上面的监听后,键盘弹出时就会调用下面方法,只需在此设置uipopovercontroller的popovercontentsize即可。
-(void)keyBoardWillShow:(id)sender
{
popView.popoverContentSize =CGSizeMake(320,popView.popoverContentSize.height);
}