Closed arskinner closed 10 years ago
You can try to recompile it with 3.1.3. I'm not setting the status bar anywhere, so I might be some default behavior.
I tried recompiling with 3.1.3 and didn't have any luck...
what about this?
<ios>
<plist>
<dict>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
</dict>
</plist>
</ios>
That was the first thing I tried. It definitely changes every other window to the light mode, but the SlideMenu windows remain dark.
hmm. then I guess it is the library. The bad news is that the guy who made it, is not updating it anymore..
@beaurushton did you recompile the SlideMenu module or did you just recompile your app on 3.1.3? I haven't tried rebuilding the module from source yet.
I recompiled the module. Had to change one line of code in DkNappSlidemenuSlideMenuWindow.m Line 28
return [[[TiViewController alloc] initWithViewProxy:(TiViewProxy
I've managed to work around this by adding the code @viezel mentioned about the the tiapp.xml and then explicitly setting the center window again after opening it. eg.
var window = NappSlideMenu.createSlideMenuWindow({ centerWindow: alerts, leftWindow:winLeft, translucent: false, leftLedge: 100, }); window.open(); //init the app window.setCenterWindow(alerts); // hack to reset statusbar to light content
interesting @beaurushton. Does that also work for you @arskinner ?
Thanks @beaurushton , it work fine for me. Another work around is to open slide menu like modal window with this solution you don't need to set the center window again after opening it.
var window = NappSlideMenu.createSlideMenuWindow({
centerWindow: alerts,
leftWindow:winLeft,
translucent: false,
leftLedge: 100,
modal: true
});
window.open(); //init the app
But this is a strange behavior, what do you think @viezel?
it is. Its because the window architecture changed in Titanium to support iOS7. So until I figure out a new way to support this, I guess the hacks are the only way. NOt great, but it works.
Great, however @beaurushton if the center window is a NavGroup and you set it again the center window show a black window as described in #18.
Yes, the modal: true solution works for me. I did definitely have to rebuild with 3.1.3.GA to get modal: true to work though, it did not work with the module in the dist folder.
I've tried to follow your advice on this issue but I can't get it to work..I would really appreciate it if someone could mention all the required steps in a single post :) By the way, regarding the changes mentioned for tiapp.xml do we just paste:
I am already using a custom plist file for custom fonts, so perhaps I need to include the above mentioned key/value pairs directly in my plist file instead of tiapp.xml?
Many thanks to everyone looking into the issue.
Cancel that, it works ok by modifying tiapp.xml and using modal:true. However, I cannot set the status bar color to be the same as my nav bar color (as seen on manu ios7 apps) - has anyone been able to do so?
have a try with this new release: https://github.com/viezel/NappSlideMenu/releases/tag/1.4.0
Hi.
I managed to solve this issue by using "modal: true", but then every new window has to be modal too - and then they are animated from the bottom (which is not that you want to have for all windows, looks really badly).
Is there any other workaround?
I'm using latest version of this module.
Thanks,
Ivan
And funny thing is ... after I open new window for second time (with correct status bar color), it somehow fixes status bar color of this module's window (so, first time I open and close new window, color is black, after second time, it's white)!
Weird ...
Hahaha ... well, I found a workaround, can't believe how dumb it is, I didn't think it would work, but it tried it and it worked.
After you open module's window, do this:
var tmpWin = Ti.UI.createWindow({
backgroundColor: 'transparent',
zIndex: 1000,
touchEnabled: false
});
tmpWin.open();
This works as well:
var dummyWin = Ti.UI.createWindow({ width:0, height:0, statusBarStyle: Ti.UI.iPhone.StatusBar.LIGHT_CONTENT, // fullscreen: true, }); dummyWin.open();
Remember to read this: http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_7_Migration_Guide-section-37533766_iOS7MigrationGuide-StatusBar
Hey Mads, Awesome module. I tested and this latest fix allows you to set the Status Bar style but I'm still needing the tmpWin.open() hack to hide the statusbar. Any suggestions how to do this more cleanly?
cant you just set that in the tiapp.xml file?
For me it works now without the dummyWindow hack. Just set the statusBarStyle in the leftWindow.
var leftWindow = Ti.UI.createWindow({
statusBarStyle: Ti.UI.iPhone.StatusBar.LIGHT_CONTENT,
...
});
Or use the default solution: https://github.com/viezel/NappSlideMenu#statusbarstyle
I just tried running one of our apps on iOS 7 and it seems that setting the statusBarStyle on the SlideMenu window doesn't work. No matter what the status bar text is black, which doesn't work over a dark background. Any idea how to get the status bar color set properly? Would it help to recompile the module from source?