Dismiss iphone keyboard

后端 未结 5 796
一向
一向 2020-11-29 05:38

I am trying to recreate something similar to the popup keyboard used in safari.

\"alt<

5条回答
  •  执笔经年
    2020-11-29 06:16

    use a navigation controller and pop the view when done?

    for example, I use code like this to slide an about box in:

    [[self navigationController] presentModalViewController:modalViewController animated:YES];
    

    and then when the button in that about box is clicked, I use this to get rid of it:

    [self.navigationController dismissModalViewControllerAnimated:YES];
    

    In my case the about box occupies the whole screen, but I don't think it would have to for this to work.

    edit: I think I may have misunderstood your question. Something along the lines of my code would be if you are faking the whole keyboard view yourself. I think that resign first responder is the right way to do it if it is the normal keyboard with your toolbar added on top.

提交回复
热议问题