开发者

Manipulate the iPhones UIKeyboard as a "regular" UIView

开发者 https://www.devze.com 2022-12-14 19:27 出处:网络
Im struggling a bit with the UIkeyboard, I have a datePicker, IntervalPicker some custom pickers and a few other UI elements that live in the same part of the screen as the keyboard.

Im struggling a bit with the UIkeyboard, I have a datePicker, IntervalPicker some custom pickers and a few other UI elements that live in the same part of the screen as the keyboard.

I have build a factory class that places these on the screen depending on the state of the app, I control animation and layering myself and here the problem starts. It all works for the e开发者_JS百科lements I mentioned, but the Keyboard I can't seem to control to the same extend.

I would like to instantiate a keyboardView, place it on the screen with an alpha of 0 inside an UIView and when Im good and ready, fade and animate it in.

It seems I can only get a Keyboard on the screen if I build a textField and then set it as firstResponder, this results in the keyboard animating in as expected, but it completely breaks my factory approach.

Hope it makes sense:) thanks for any help given.


The keyboard isn't a regular view. You have to stop trying to use it like one. How to pull up a UIKeyboard without a UITextField or UITextView? Don't fight with the SDK, make the sdk your friend.

0

精彩评论

暂无评论...
验证码 换一张
取 消