Dismiss keyboard with swipe gesture (as in Message app)

后端 未结 8 805
萌比男神i
萌比男神i 2021-01-30 17:25

When the keyboard is showing on the iPhone\'s Messages app, if the user begins a swipe down from the messages tableview and continues into the keyboard area, the keyboard will b

8条回答
  •  故里飘歌
    2021-01-30 17:39

    Short answer; They're most likely doing some 'Private API' thing there.

    I'm most sure that the keyboard is in an independent view, above your app's window (You do not have access/control to it and it always displays on top, no matter what). The most you can do is have the input view become/resign first responder status, and the keyboard will appear/disappear accordingly: All or nothing.

    You may be able to get a handle of the keyboard view and change its frame property (using undocumented properties of documented classes, and undocumented classes), but I'm pretty sure that will get you kicked out of the store.

提交回复
热议问题