GithubHelp home page GithubHelp logo

iOS 7 statusBarStyle about nappslidemenu HOT 25 CLOSED

viezel avatar viezel commented on June 18, 2024
iOS 7 statusBarStyle

from nappslidemenu.

Comments (25)

viezel avatar viezel commented on June 18, 2024

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.

from nappslidemenu.

beaur avatar beaur commented on June 18, 2024

I tried recompiling with 3.1.3 and didn't have any luck...

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

what about this?

<ios>
    <plist>
        <dict>
            <key>UIStatusBarStyle</key>  
            <string>UIStatusBarStyleLightContent</string>
        </dict>
    </plist>
</ios>

from nappslidemenu.

arskinner avatar arskinner commented on June 18, 2024

That was the first thing I tried. It definitely changes every other window to the light mode, but the SlideMenu windows remain dark.

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

hmm. then I guess it is the library.
The bad news is that the guy who made it, is not updating it anymore..

from nappslidemenu.

arskinner avatar arskinner commented on June 18, 2024

@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.

from nappslidemenu.

beaur avatar beaur commented on June 18, 2024

I recompiled the module. Had to change one line of code in DkNappSlidemenuSlideMenuWindow.m Line 28
return [[[TiViewController alloc] initWithViewProxy:(TiViewProxy*)proxy] autorelease];
return [[[TiViewController alloc] initWithViewProxy:proxy] autorelease];
as someone suggested in your NappDrawer module...

from nappslidemenu.

beaur avatar beaur commented on June 18, 2024

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

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

interesting @beaurushton. Does that also work for you @arskinner ?

from nappslidemenu.

mantonaci avatar mantonaci commented on June 18, 2024

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

from nappslidemenu.

mantonaci avatar mantonaci commented on June 18, 2024

But this is a strange behavior, what do you think @viezel?

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

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.

from nappslidemenu.

mantonaci avatar mantonaci commented on June 18, 2024

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.

from nappslidemenu.

arskinner avatar arskinner commented on June 18, 2024

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.

from nappslidemenu.

jkritikos avatar jkritikos commented on June 18, 2024

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:

UIStatusBarStyle UIStatusBarStyleLightContent

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.

from nappslidemenu.

jkritikos avatar jkritikos commented on June 18, 2024

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?

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

have a try with this new release: https://github.com/viezel/NappSlideMenu/releases/tag/1.4.0

from nappslidemenu.

iskugor avatar iskugor commented on June 18, 2024

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

from nappslidemenu.

iskugor avatar iskugor commented on June 18, 2024

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 ...

from nappslidemenu.

iskugor avatar iskugor commented on June 18, 2024

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();

from nappslidemenu.

tujoworker avatar tujoworker commented on June 18, 2024

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

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

Fixed: https://github.com/viezel/NappSlideMenu/releases/tag/1.4.2

from nappslidemenu.

jerodfritz avatar jerodfritz commented on June 18, 2024

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?

from nappslidemenu.

viezel avatar viezel commented on June 18, 2024

cant you just set that in the tiapp.xml file?

from nappslidemenu.

tujoworker avatar tujoworker commented on June 18, 2024

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

from nappslidemenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.