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

Hide title url #19

Open
WenchaoD opened this issue Feb 10, 2015 · 12 comments
Open

Hide title url #19

WenchaoD opened this issue Feb 10, 2015 · 12 comments

Comments

@WenchaoD
Copy link

Hey, @dzenbot
I found your webViewController is really helpful, especiall the ProgressView part. But in some case, the url in the titleView might appears a bit wierd. Maybe we can add a flag to hide it?

@dzenbot
Copy link
Owner

dzenbot commented Feb 10, 2015

Hey there!
What do you mean by weird?

@WenchaoD
Copy link
Author

For example, sometimes we want the url to be secret to protect some potential threat(it can't indeed, but better than do nothing).

@jyounus
Copy link

jyounus commented Apr 19, 2015

I just came across a "weird" behaviour with the title bar.
The initial URL I load is for a blog post with a relatively big title. Everything is fine.
However if I now press on a link to go to the homepage of that blog, the URL and title are relatively small (character count wise). The problem is, the frame of the label doesn't seem to position the x coordinate properly. It's not centred, it simply has the same x value as the big title/url was.

I tried to fix it by manually working out the final label frame size in the setTitle method but no luck. :/

@dzenbot
Copy link
Owner

dzenbot commented Apr 19, 2015

This looks like it's another issue, not related to @f33chobits's feature request.
Please open a new issue, and submit a screenshot to better understand.

@nsvrana
Copy link

nsvrana commented Feb 1, 2016

I second the feature request to hide the title/url bar but leave the navigation bar.

@dzenbot
Copy link
Owner

dzenbot commented Feb 22, 2016

This should be pretty easy to implement. Give it a try guys! 😉

@hesyifei
Copy link
Contributor

hesyifei commented Jul 4, 2016

Any solution?

@hesyifei
Copy link
Contributor

hesyifei commented Jul 4, 2016

Found a solution to display title only :)

First set showPageTitleAndURL to false

let webViewController = BeaconWebViewController(URL: loadUrl)
webViewController.showPageTitleAndURL = false
webViewController..........

Then in class BeaconWebViewController: DZNWebViewController, override didFinishNavigation

override func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
    self.title = self.webView.title
}

Done! 😄

@dzenbot
Copy link
Owner

dzenbot commented Jul 6, 2016

Can anyone implement this tweak and submit a PR pls? I'm really short of time lately.

@hesyifei
Copy link
Contributor

hesyifei commented Jul 7, 2016

@dzenbot see 5e75217

@dzenbot
Copy link
Owner

dzenbot commented Jul 7, 2016

This has been addressed by @eflyjason in #52
Mind having a look @WenchaoD?

@WenchaoD
Copy link
Author

WenchaoD commented Jul 7, 2016

Sure @dzenbot

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

No branches or pull requests

5 participants