mackuba/SafariAutoLoginTest

let me know if you know a better way to do this :)

BillCarsonFr opened this issue · 1 comments

Hi,

Instead of presenting the Safari ViewController other the current context, i saw this alternative in StackOverFlow (http://stackoverflow.com/questions/33089919/how-to-hide-sfsafariviewcontroller)

        let windowRootController = UIViewController()
        self.secondWindow = UIWindow(frame:CGRectZero)
        self.secondWindow!.rootViewController = windowRootController
        self.secondWindow!.makeKeyAndVisible()
        self.secondWindow?.alpha = 0

        windowRootController.presentViewController(safari, animated: false, completion: nil)

It seems to have some advantages, has it's not blocking the current vue from user interactions, and one can also do it way before the viewDidLoad(). What do you think?