Help us understand the problem. What is going on with this article?

dismissViewControllerAnimatedで画面が真っ暗になる問題

More than 1 year has passed since last update.

modalPresentationStyleを.OverCurrentContextにしてモーダルを表示して消す際にcompleteTransitionを呼ぶと何故か呼び出し元のビューコントローラのビューが吹き飛ぶ

                    fromViewController?.view.removeFromSuperview()
                    if let toView = toViewController?.view {
                        self.transitionContext!.completeTransition(true)
                        UIApplication.sharedApplication().keyWindow?.addSubview(toView)
                    }
                    self.transitionContext = nil

こうやってもう一回付けてあげればおk
key windowが動的に生成されてたりするとぶっ壊れる気がする。

ios - "From View Controller" disappears using UIViewControllerContextTransitioning - Stack Overflow

iOS8からのバグっぽい

noppefoxwolf
きつねすき、にんげんこわい
https://noppelab.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away