Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/inamiy/ios6-forwardautorotate

UIKit-additions to forward iOS6 rotation methods.
https://github.com/inamiy/ios6-forwardautorotate

Last synced: 3 months ago
JSON representation

UIKit-additions to forward iOS6 rotation methods.

Awesome Lists containing this project

README

        

iOS6-ForwardAutorotate 1.0.0
============================

UIKit-additions to forward iOS6 rotation methods.

Install via [CocoaPods](http://cocoapods.org/)
----------

```
pod 'iOS6-ForwardAutorotate'
```

Code
-------

```
@implementation UINavigationController (iOS6ForwardAutorotate)

- (BOOL)shouldAutorotate
{
return [self.viewControllers.lastObject shouldAutorotate];
}

- (NSUInteger)supportedInterfaceOrientations
{
return [self.viewControllers.lastObject supportedInterfaceOrientations];
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return [self.viewControllers.lastObject preferredInterfaceOrientationForPresentation];
}

@end
```

License
-------
`iOS6-ForwardAutorotate` is available under the [Beerware](http://en.wikipedia.org/wiki/Beerware) license.

If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.