Don't swizzle unnecessarily on iOS 17

This commit is contained in:
Shadowfacts 2023-09-09 11:45:54 -04:00
parent b28792eb29
commit 1ca84a3b95
1 changed files with 4 additions and 0 deletions

View File

@ -198,7 +198,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
@available(iOS, obsoleted: 17.0)
private func swizzlePresentationController() {
guard #unavailable(iOS 17.0) else {
return
}
var originalIMP: IMP?
let imp = imp_implementationWithBlock({ (self: UIPresentationController) in
let new = UITraitCollection(pureBlackDarkMode: self.presentingViewController.traitCollection.pureBlackDarkMode)