Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 695 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 695 Bytes

DontRotateSwift

Example project for disabling rotation on certain ViewControllers in custom UINavigationController

Linked to this SO Question

dontrotategif

Key parts:

  • Custom UINavigationController class assigned in Storyboard
  • Check if this ViewController is the one you want to disable roration on
  if topViewController!.isKindOfClass(ViewController) {
  // If true return false to disable it
    return false
  }