我使用的是
UITableViewController
在一个
UIViewController
如下所示:
UITableViewController *tvc = [[UITableViewController alloc] init];
[self.view addSubview:tvc.view];
现在,在这个里面
表格控制器
我希望能够提出一个
SFSafariViewController
如有必要。我写了下面的代码:
if (showLink) {
SFSafariViewController *sfsvc = [[SFSafariViewController alloc] initWithURL:[NSURL URLWithString:@"https://www.google.com"]];
[self.presentingViewController.navigationController pushViewController:sfsvc animated:YES];
}
每当我运行此操作时,控制台中都会出现以下错误,但什么也没有发生:
[Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFSafariViewController: 0x7f8aef82a600>)