UISearchbar clearButton forces the keyboard to appear

后端 未结 12 1930
暖寄归人
暖寄归人 2020-11-30 20:40

I have a UISearchBar which acts as a live filter for a table view. When the keyboard is dismissed via endEditing:, the query text and the gray circular \"clear\" button rem

12条回答
  •  情歌与酒
    2020-11-30 21:32

    I've run into this several times now. I really appreciate the answers that people have given.

    Ultimately, I would really like to see Apple just allow us (the developers) to detect when the clear button has been pressed.

    It is obvious that pressing it gets detected because any text in the search box gets cleared.

    I am guessing that it just isn't very high up on their list of priorities right now... But I really wish someone at Apple would give UISearchBar a little love!

提交回复
热议问题