Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 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
    Felgo Team

    Hi Heini,

    with new projects generated after Felgo 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 Felgo project and copy it to your existing .pro file (or just replace it).

    Cheers, Chris

    #8780

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

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded