Skip to content

Commit

Permalink
closes #705 Blank view from #TARGET_IS_EXTENSION
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMatt committed Mar 7, 2021
1 parent 5715db1 commit 44e9a75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Sources/Extensions/UIViewController+Hero.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,7 @@ public extension HeroExtension where Base: UIViewController {
parentVC.present(next, animated: false, completion: completion)
}
} else {
#if TARGET_IS_EXTENSION
UIApplication.shared.keyWindow?.rootViewController = next
#endif
parentVC?.view.window?.rootViewController = next
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions Sources/Transition/HeroTransition+Complete.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ extension HeroTransition {
if isPresenting != finished, !inContainerController, transitionContext != nil {
// only happens when present a .overFullScreen VC
// bug: http://openradar.appspot.com/radar?id=5320103646199808
#if TARGET_IS_EXTENSION
UIApplication.shared.keyWindow?.addSubview(isPresenting ? fromView : toView)
#endif
container.window?.addSubview(isPresenting ? fromView : toView)
}
}

Expand Down

0 comments on commit 44e9a75

Please sign in to comment.