使用SafariViewContoller
// 导入SafariServices.h
#import <SafariServices/SafariServices.h>
// 设置代理
@interface VC1 ()<SFSafariViewControllerDelegate>
@end
// 点击使用
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
// 输入项目的隐私政策的 URL
SFSafariViewController *sfVC = [[SFSafariViewController alloc]initWithURL:[NSURL URLWithString:@"https://www.baidu.com/#privacy"]];
sfVC.delegate = self;
[self.navigationController presentViewController:sfVC animated:YES completion:nil];
}
# pragma
# pragma mark - SFSafariViewControllerDelegate -
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller{
NSLog(@"点击done");
}
隐私政策自动生成网址
隐私政策