为将 iOS6 的旋转方法前传至 UIKit
@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
iOS6-ForwardAutorotate
授权采用 啤酒酒牌 许可。
如果有一天我们相遇,你认为这些工作很有价值,你可以请我喝一杯酒作为回报。