0

I have UINavigationController, firstViewController (rootController for navigationController), secondViewController and SFSafariViewController.

If I present SFSafariViewController from firstViewController, it shown correctly and load page successfully. But, if I move to secondViewController, and try to present SafariViewController, I see only white window.

I tried to present SFSafariViewController from:

override func viewDidAppear(animated: Bool)

And I tried to present SFSafariViewController by touch on button and had same result. The code for show SFSafariViewController:

let urlString:String = "https://google.com"
let url = NSURL(string:urlString)!
let svc = SFSafariViewController.init(URL: url)
self.navigationController?.presentViewController(svc, animated: true, completion: nil)
val_lek
  • 3,120
  • 3
  • 14
  • 12
  • 1
    How do you present your _secondViewController_? – Matz Aug 26 '16 at 11:58
  • 1
    Matz, thank you, I found solution. I presented secondViewController by method presentViewController(..), but I must to use pushViewController(), really? When I set pushViewController it shown correctly – val_lek Aug 26 '16 at 12:01
  • 1
    Yes, you can not present 2 Controller on top of each other. But I'm sure there was a notice in the console. – Matz Aug 26 '16 at 12:03
  • Unfortunately, I hadn't any notification about it in console, so I asked – val_lek Aug 26 '16 at 12:10

0 Answers0