Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Display touches in a SFSafariViewController #82

Open
davidgeilfus opened this issue Feb 21, 2018 · 2 comments
Open

Display touches in a SFSafariViewController #82

davidgeilfus opened this issue Feb 21, 2018 · 2 comments

Comments

@davidgeilfus
Copy link

Hi, how can I display touches in a SFSafariViewController that is presented programmatically from another view controller? Here is my current code:

let svc = SFSafariViewController(url: NSURL(string: self.urlString)! as URL)
        
svc.delegate = self
present(svc, animated: true, completion: {
    Visualizer.start()
})

I also tried to start the Visualizer within a SFSafariViewControllerDelegate event handler:

func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {
    Visualizer.start()
}

… But in any case, touches aren't displayed. Any idea why? Thanks!

@davidgeilfus
Copy link
Author

I moved the call to Visualizer.start() to the AppDelegate and touches are visualized just fine… Until the SFSafariViewController is presented. When going back to the initial view controller, touches aren't displayed anymore.

@morizotter
Copy link
Owner

Mmm.. Thanks for reporting that.

Basically Visualizer is displayed on the active window, so I guess When SFSafariViewController shows, the window may change...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants