SFSafariViewController无法以纵向模式工作

时间:2017-01-19 18:30:26

标签: ios objective-c sfsafariviewcontroller

我正在模拟器中试用iPad Pro上的新SFSafariViewController。它适用于风景而非肖像。这是我的代码:

NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"https://forums.greenrobot.com"]];
if ([SFSafariViewController class] != nil) {
    //SFSafariViewController *sfvc = [[SFSafariViewController alloc] initWithURL:URL];
    SFSafariViewController *sfvc = [[SFSafariViewController alloc]initWithURL:URL entersReaderIfAvailable:YES];

    [self presentViewController:sfvc animated:YES completion:nil];
} else {
    [[UIApplication sharedApplication] openURL:URL];
}

Working in Landscape Not working portrait

0 个答案:

没有答案