viezel / NappDrawer

A side drawer navigation container view controller for Appcelerator Titanium.
MIT License
247 stars 128 forks source link

iOS: Fix statusbar style handling (#56 / #13) #219

Closed kbshl closed 6 years ago

kbshl commented 6 years ago

Hey @viezel,

seems like I finally found the error that is causing to ignore statusbar style changes for the center window.

TIL Cause the center window never gets added to the containedWindows property on TiRootViewController, statusbar style changes on center window are ignored. More specifically the left/rights drawers window is asked for the statusbar style by TiRootViewController. This is fixed by calling windowWillOpen and windowDidOpen on the center window proxy AFTER fetching the view controllers for the left and right drawer. Cause fetching the left and right drawer view controllers is implicitly calling windowWillOpen and windowDidOpen on their proxies, adding them to the TiRootViewControllers containedWindows array.

Done some more stuff:

Likely to fix:

Binary is added as an commit.

viezel commented 6 years ago

@hansemannn can you review this?

kbshl commented 6 years ago

@hansemannn, thank you for your time and the review šŸ™‡šŸ»ā€ā™‚ļø

Made the changes you are mentioned and tested it. Hope it fits now.

fahad86 commented 5 years ago

@kbshl How can I set the statusBarStyle?

I tried:

NappDrawerModule.setStatusBarStyle(NappDrawerModule.STATUSBAR_WHITE);

and

drawer.preferredStatusBarStyle = Alloy.Globals.NappDrawerModule.STATUSBAR_WHITE;

but no luck, I'm still seeing dark text. Using Ti SDK 8.0.2, iOS Simulator iPhone Xs

Thanks and Regards