I have a simple Settings table view that is the first view of a UINavigationController.
I present the Settings UINavigationController with the .FormSheet modalPresentationStyle, which means on an iPhone it takes up the full screen, while on an iPad, it displays centered modally.
Now I want want one of the rows in the Settings table to push a SFSafariViewController onto the navigation stack.
This works fine on an iPhone, but on the iPad it does not. iPad screenshot:
Note that the part of the SFSafariViewController navigation bar shows underneath the navigation bar (with the Settings back button). See red rectangle in image.
let urlText = "http://www.apple.com"
let url = NSURL(string: urlText)!
let safariViewController = SFSafariViewController(URL: url)
self.navigationController?.pushViewController(safariViewController, animated: true)
On the iPhone, you don't see the SFSafariViewController navigation bar at all - which is perfect for my use case.
Any magic setting to make this work correctly?
SFSafariViewController is available to iOS9.0 or above version of apple os. According to your problem you have facing some problem show some gap in you navigation bar with SFSafariViewController view.because
SFSafariViewController is embed own navigation bar, UISearchbar, UIBarButton.when you push SFSafariViewController from over ViewController then you app navigation bar show over the SFSafariViewController navigation bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With