Skip to content

Commit 98e8a45

Browse files
authored
Remove deprecated API shouldAutorotate in DrawerController (#1796) (#1797)
* Remove shouldAutorotate * Add new API
1 parent 79522de commit 98e8a45

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ios/FluentUI/Drawer/DrawerController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,6 @@ open class DrawerController: UIViewController, TokenizedControlInternal {
363363
return super.preferredContentSize.height == 0 && preferredContentHeight == 0 && (contentController?.preferredContentSize.height ?? 0) == 0
364364
}
365365

366-
open override var shouldAutorotate: Bool {
367-
return presentingViewController?.shouldAutorotate ?? super.shouldAutorotate
368-
}
369-
370366
open override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
371367
return presentingViewController?.supportedInterfaceOrientations ?? super.supportedInterfaceOrientations
372368
}
@@ -524,6 +520,10 @@ open class DrawerController: UIViewController, TokenizedControlInternal {
524520
tokenSet.registerOnUpdate(for: view) { [weak self] in
525521
self?.updateBackgroundColor()
526522
}
523+
524+
if #available(iOS 16, *) {
525+
setNeedsUpdateOfSupportedInterfaceOrientations()
526+
}
527527
}
528528

529529
open override func viewWillAppear(_ animated: Bool) {

0 commit comments

Comments
 (0)