0

我有一个使用接口的自定义键盘布局在一个.xib文件中(不使用自动布局)。目前,我无法将界面的高度扩展到超过默认的 216 点。

我曾尝试使用 Apple 建议的方法来限制键盘的高度NSLayoutConstraint constraintWithItem: self.view...,但这只会导致键盘根本不出现。

这就是我在我的KeyboardViewController.m(的子类InputViewController)中初始化接口的方式

[[NSBundle mainBundle] loadNibNamed:@"CustomKeyboardLayout" owner:self options:nil];
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width; //these have no effect in determining the height/width of the keyboard
CGFloat screenHeight = screenRect.size.height;
self.keyboardOverlayView.frame = CGRectMake(0, 0, screenWidth, screenHeight);
4

0 回答 0