Open T3Z3N opened 4 years ago
Can you please apply the following?
let safariViewController = SFSafariViewController(URL: url)
presentViewController(safariViewController, animated: true) {
var frame = safariViewController.view.frame
let OffsetY: CGFloat = 64
frame.origin = CGPoint(x: frame.origin.x, y: frame.origin.y - OffsetY)
frame.size = CGSize(width: frame.width, height: frame.height + OffsetY)
safariViewController.view.frame = frame
}
presentViewController(svc, animated: true) {
let width: CGFloat = 66
let x: CGFloat = self.view.frame.width - width
// It can be any overlay. May be your logo image here inside an imageView.
let overlay = UIView(frame: CGRect(x: x, y: 20, width: width, height: 44))
overlay.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.5)
svc.view.addSubview(overlay)
}
@EddyVerbruggen
I'd be happy to merge a PR! This looks like Swift, so I can't simply paste that into the project. And you may want to make it configurable through the JS API..
True. I am a little rusty on my ObjC. I can attempt it in the next month or so.
@EddyVerbruggen was this ever implemented ?
No
can we have the ability to hide url and show only the web content.