Forums

OverviewV-Play 2 Support (Qt 5) › How to hide statusbar on iOS

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #8777

    Heini

    Hi,

    I am using an iPhone 4 and a iPad for developing, both running with iOs 6. When I run the app, statusbar (the thing with the battery status, just to avoid mistakes) is always showing up on both devices. In the plist-file UIStatusBarHidden is YES and UIViewControllerBasedStatusBarAppearance is NO. Do I miss something?

     

    Thanks,

    Heini

    #8778

    Christian
    V-Play Team

    Hi Heini,

    with new projects generated after V-Play version 2.3.0, the status bar is hidden automatically on iOS & Android. You can have a look at the .pro file of a new V-Play project and copy it to your existing .pro file (or just replace it).

    Cheers, Chris

    #8780

    Alex
    V-Play Team

    Hi Heini,

    the visible status bar on iOS 6 might be an issue with the underlying Qt code, as a workaround you can perform the following steps:

    • Copy your main.cpp file as main.mm
    • Add the following code block to your Qt project file (.pro), replacing the “SOURCES += main.cpp” line:
    ios {
      OBJECTIVE_SOURCES += main.mm
    } else: {
      SOURCES += main.cpp
    }
    • ¬†Add “#import <UIKit/UIKit.h>” to the list of header definitions in your main.mm file
    • Add following line just before the “return app.exec();” statement in your main.mm file:
    [[UIApplication sharedApplication] setStatusBarHidden:YES];

    Hope this fixes your issue.

    Best,

    Alex

    #8790

    Heini

    Hi Alex,

    thanks for the quick response! Your suggestions solved the problem!

     

    Cheers,

    Heini

    #8996

    Heini

    Hi,

    i have several TextInput fields in my game. Now, after the user entered the desired text, the statusbar comes back again on previous ios versions (i.e. ios6). Is there a way to prevent this and to hide the statusbar permanently?

     

    Thanks!

    Heini

    #9000

    Alex
    V-Play Team

    Hello Heini,

    Which item for TextInput are you using?

    Cheers,

    Alex

    #9002

    Heini

    Hi Alex,

    today I updated to the latest version and it seems that it solved that problem. Statusbar is not showing any more!

    Cheers

    Heini

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support