Closed hesyifei closed 8 years ago
You could probably add the line break here instead: @"\n%@"
@dzenbot then if user uses DZNWebInfoOnNavigationBarURL
only, the URL will not be centered inside navigation bar as the text
is \n[URL]
This looks great! Thanks for doing this @eflyjason
Generally looks good @dzenbot @eflyjason , but it would be better if we can have two optimizations:
showPageTitleAndURL
, so it would be more friendly if we declare it 'deprecated' rather than removing it from header.self.infoOnNavigationBar = DZNWebInfoOnNavigationBarURL | DZNWebInfoOnNavigationBarTitle;
which means both show url and title. But it turns out this is not working in this PR.
Thanks for this @eflyjason.
One difference between NS_ENUM and NS_OPTIONS is that the later supports bitwise operation, for example:
@WenchaoD @dzenbot I found out that other var like DZNsupportedWebActions
and DZNWebNavigationTools
is defined as NS_OPTIONS
and I remember that work properly with |
which means both show url and title. But it turns out this is not working in this PR.
@WenchaoD Fixed in 1a2ca57. WVC.infoOnNavigationBar = DZNWebInfoOnNavigationBarURL | DZNWebInfoOnNavigationBarTitle;
works properly now 😄
There should be users already use the property showPageTitleAndURL, so it would be more friendly if we declare it 'deprecated' rather than removing it from header.
bfd7414. Done :)
So can merge it? 😁
@dzenbot
The` All definition should be defined as Title | URL.
You mean DZNWebInfoOnNavigationBarAll = DZNWebInfoOnNavigationBarTitle | DZNWebInfoOnNavigationBarURL,
?
see #56
Yes exactly. Why did you close the PR tho?
😂#56
Show info (e.g. title/URL) on navigation bar based on a
NS_OPTIONS(DZNWebInfoOnNavigationBar)
instead ofshowPageTitleAndURL
used previouslyBTW I think the name of this
NS_OPTIONS(DZNWebInfoOnNavigationBar)
can be better. Can anyone help?