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