ハックソリューション使用してスウィズリング:
#import "UIViewController+RoutingSheet.h"
#import <objc/runtime.h>
@implementation UIViewController (RoutingSheet)
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
SEL originalSelector = @selector(shouldAutorotate);
SEL swizzledSelector = @selector(shouldAutoRotateOverrideRoutingSheet);
Method originalMethod = class_getInstanceMethod(self, originalSelector);
Method extendedMethod = class_getInstanceMethod(self, swizzledSelector);
method_exchangeImplementations(originalMethod, extendedMethod);
});
}
- (UIWindow *)currentWindow {
for (UIWindow *window in [[UIApplication sharedApplication] windows]) {
if (window.rootViewController == self)
return window;
}
return nil;
}
- (BOOL)shouldAutoRotateOverrideRoutingSheet {
UIWindow *window = [self currentWindow];
if (window != nil) {
NSString *className = NSStringFromClass(window.class);
if ([className containsString:@"MPAVRoutingSheetSecureWindow"]) {
return NO;
}
}
return [self shouldAutoRotateOverrideRoutingSheet];
}
@end
https://openradar.appspot.com/radar?id=4974311702003712
バグを実証テストプロジェクトを作成しました –