#1098 - Fixed iOS 15 issues.

This commit is contained in:
Stefan Ceriu
2021-10-06 14:43:21 +03:00
parent 17041e00dd
commit e0b69d07bc
2 changed files with 10 additions and 0 deletions
@@ -45,6 +45,15 @@ class VectorHostingController: UIHostingController<AnyView> {
self.update(theme: self.theme)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
// Fixes weird iOS 15 bug where the view no longer grows its enclosing host
if #available(iOS 15.0, *) {
self.view.invalidateIntrinsicContentSize()
}
}
private func registerThemeServiceDidChangeThemeNotification() {
NotificationCenter.default.addObserver(self, selector: #selector(themeDidChange), name: .themeServiceDidChangeTheme, object: nil)
}