当我尝试推送Safari ViewController时会发生两件奇怪的事情:
带有完成按钮的地址栏位于我的导航栏下方;
委托方法safariViewControllerDidFinish:当我按下后退按钮时不会被调用.
我不认为Apple会批准这种行为,所以:
有没有办法推动Safari ViewController没有这些问题?
我正在使用SafariViewController显示网页,而不是默认的"完成"按钮,我从我的应用程序推送NavigationController以保留我的导航堆栈和后退箭头.但是,我需要隐藏默认的完成按钮和搜索栏SafariViewController.这可能吗?请参阅下面的代码和屏幕截图...
let svc = SFSafariViewController(URL: pinterestSafariURL)
navigationController?.pushViewController(svc, animated: true)
Run Code Online (Sandbox Code Playgroud)
注意:链接到这个问题,但答案是黑客,而我正在寻找使用SafariViewController API的解决方案:SFSafariViewController:隐藏导航栏