jmstone617/PickyTabBarController
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Version 1.0: This class is a very simple subclass of UITabBarController. Simply replace Apple's stock UITabBarController with an instance of PickyTabBarController, and configure in your individual UIViewControllers which orientations you want to allow. The impetus behind this class arose when I was working on a project in which I needed a view hierarchy such as this: UITabBarController - UINavigationController - UIViewController - UINavigationController - UIViewController - UIViewController - UINavigationController - UIViewController The issue was in some cases, my UIViewController should support landscape mode, but in other cases only portrait. The standard Apple UITabBarController is an all-or-nothing situation. Either every view controller supports all orientations, or they all support none. This is intended to be very much of a plug-and-play type of subclass. Simply import PickyTabBarController.h into your AppDelegate (it's named because you can be picky about which view controllers rotate and which don't; get it?). NOTE: Version 1.0 assumes that each of your view controllers are rooted in a navigation controller, such as in the above view hierarchy example. If you just have UIViewControllers inside of your UITabBarController, you will need to make some changes to this subclass. I intend to make appropriate changes in a future version
About
A tab bar controller that doesn't care which view controllers rotate and which don't.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published