Skip to content

Example project for disabling rotation on certain ViewControllers in custom UINavigationController

Notifications You must be signed in to change notification settings

hungrxyz/DontRotateSwift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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
  }

About

Example project for disabling rotation on certain ViewControllers in custom UINavigationController

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages