dismissViewControllerAnimated is called but ViewController is not dismissed

前端 未结 5 1641
旧巷少年郎
旧巷少年郎 2021-02-02 06:02

I am having a problems with the dismissViewControllerAnimated method not closing down the view.

What is happening in the app here is:

  • Cell in
5条回答
  •  隐瞒了意图╮
    2021-02-02 06:50

    Had a problem where calling dismissViewControllerAnimated dismissed the keyboard in a UIViewController, but not the view itself.

    Solved it by using two calls:

    [self dismissViewControllerAnimated:NO completion:nil];
    [self dismissViewControllerAnimated:YES completion:nil];
    

    an instant one for the keyboard, then an animated one for the controller

提交回复
热议问题