Open WenchaoD opened 9 years ago
Hey there! What do you mean by weird?
For example, sometimes we want the url to be secret to protect some potential threat(it can't indeed, but better than do nothing).
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. :/
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.
I second the feature request to hide the title/url bar but leave the navigation bar.
This should be pretty easy to implement. Give it a try guys! 😉
Any solution?
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! 😄
Can anyone implement this tweak and submit a PR pls? I'm really short of time lately.
@dzenbot see 5e75217
This has been addressed by @eflyjason in https://github.com/dzenbot/DZNWebViewController/pull/52 Mind having a look @WenchaoD?
Sure @dzenbot
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?