Closed StefaniOSApps closed 5 years ago
Subclass the ScrollingNavigationController
and override that property (as you would with a common UINavigationController). There is no need to add another property.
Write your subclass in Swift.
... My complete project is in Objective C, so I'd like to favor this feature. Otherwise I would have to write my own subclass for this single feature. Do not you think that this is unnecessary? It would make me really happy :-) This also applies to others.
... My complete project is in Objective C,
You are using this library, so it's not really just ObjC. At any rate, the two languages are interoperable, so I fail to see the issue.
Otherwise I would have to write my own subclass for this single feature.
Like you would if you'd use a plain UINavigationController. Should I add a property for every possible override? It would pollute the API, that I intend to keep as close to the default implementation of the nav controller as possible.
Right, I use Swift Frameworks. But not in my main project with more than 50 UIViewControllers. The reason is simple. Swift was very often modified by Apple Inc. Objective C is more consistent.
I do not think that will pollute the framework. Also the successful framework RESideMenu with more than 7000 likes uses this feature (https://github.com/romaonthego/RESideMenu). This is also a specific UINavigationController extension.
He does that because there's some extra logic behind it: it's hidden (or not) when the menu is visible, and that's a piece of information that shouldn't be handled by the library user. It make sense in Roman's library, not in this one. The decision is final.
Describe the bug I want to hide the
UIStatusBar
at someUIViewControllers
. The Problem is I use the popularRESideMenu
framework with more than 7k stars (https://github.com/romaonthego/RESideMenu).The structure is:
ScrollingNavigationController
RESideMenu
controller with 2.aUIViewController
(left) 2.bUIViewController
(right) 2.cUIViewController
(content - center)The
RESideMenu
ask theScrollingNavigationController
which state theprefersStatusBarHidden
has. So I need this feature.[[UIApplication sharedApplication] setStatusBarHidden:YES];
is deprecated since iOS 7. OnlyprefersStatusBarHidden
works.I will create a PR with this feature. So can set this state by
shouldPrefersStatusBarHidden
. Default isfalse
.