Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request : ability to hide url and show only the web content. #158

Open
T3Z3N opened this issue Nov 6, 2019 · 6 comments
Open

Feature Request : ability to hide url and show only the web content. #158

T3Z3N opened this issue Nov 6, 2019 · 6 comments

Comments

@T3Z3N
Copy link

T3Z3N commented Nov 6, 2019

can we have the ability to hide url and show only the web content.

@T3Z3N T3Z3N changed the title how do we hide url and show only the web content? Feature Request : ability to hide url and show only the web content. Nov 6, 2019
@allnash
Copy link

allnash commented Dec 24, 2019

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)
}

@allnash
Copy link

allnash commented Dec 24, 2019

@EddyVerbruggen

@EddyVerbruggen
Copy link
Owner

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..

@allnash
Copy link

allnash commented Dec 24, 2019

True. I am a little rusty on my ObjC. I can attempt it in the next month or so.

@Scobee
Copy link

Scobee commented Sep 21, 2020

@EddyVerbruggen was this ever implemented ?

@EddyVerbruggen
Copy link
Owner

No

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

No branches or pull requests

4 participants