カスタムキーボード(メッセンジャーのものに似ています)(画像を含む)を表示するアプリケーションを開発しています。アニメーションでキーボードのフレームを変更するボタンを追加するように依頼されました。しかし、フレームを設定してもまったく変わりません。これは可能ですか?これをうまく行うことができますか、それとも回避策が必要ですか?
1 に答える
0
TextField の inputView プロパティを使用できます。
UITextField *textFieldWithCustomView;
UIView *customView;
[textFieldWithCustomView setInputView:customView];
展開・折り畳みしたいときに使用
- (void)toggleCustomView:(BOOL)expand
{
if (expand) {
[textFieldWithCustomView becomeFirstResponder];
}
else
{
[textFieldWithCustomView resignFirstResponder];
}
}
キーボードの使用状況を表示したい場合
[self toggleCustomView:YES];
お役に立てれば。
于 2015-02-04T09:24:06.923 に答える