1
我從表VC中創建SFSafariViewController的實例。當SafariVC打開時,旋轉設備時,它的方向不會改變(縱向到橫向,反之亦然)。有沒有快速解決這個問題?我試圖在SafariVC上使用一些佈局錨,導致崩潰。下面的代碼:使SFSafariViewController與設備一起旋轉以匹配方向
-(BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {
SFSafariViewController *sfvc = [[SFSafariViewController alloc]initWithURL:URL entersReaderIfAvailable:YES];
[sfvc setModalPresentationStyle:UIModalTransitionStylePartialCurl];
[self presentViewController:sfvc animated:YES completion:nil];
[self.tabBarController.tabBar setHidden:YES];
return NO;
}