How to Remove the Black Bar Appearing At the Bottom

Modify (or remove) black bar at bottom of iOS in QML application

Ok, this is pretty tricky to get right. Get ready.....

  1. As you have done, you have to have a launch screen storyboard which is good.
  2. I use this setting on my Window to run full screen:
    flags: Qt.Window | Qt.MaximizeUsingFullscreenGeometryHint

Probably same effect as your visibility setting above.


  1. Now, if you really want to do this right, you will need some C++ code.
QVariantMap System::getSafeAreaMargins(QQuickWindow *window)
{
QPlatformWindow *platformWindow = static_cast<QPlatformWindow *>(window->handle());
QMargins margins = platformWindow->safeAreaMargins();
QVariantMap map;
map["top"] = margins.top();
map["right"] = margins.right();
map["bottom"] = margins.bottom();
map["left"] = margins.left();
return map;
}

Note, in your .pro file you'll need to add:

QT += gui-private

and include this header:

#include <QtGui/qpa/qplatformwindow.h>

You need to put that on a class you expose to QML via a C++ class. This will return to you the "Safe Area Margins" for the current device. There's some more information on that topic here:

https://developer.apple.com/documentation/uikit/uiview/positioning_content_relative_to_the_safe_area?language=objc


  1. Now you have to use that information to adjust the layout of each of your screens.

The short of it is that when in full screen, your window extends to the physical top of the screen and to the physical bottom of the screen. And that's behind the status bar and behind the home bar at the bottom. If for instance your background is white then your white status bar will look like it disappeared when really it is there but not distinguishable.

The getSafeAreaMargins above returns info that tells you what the safe area margins are around your content based on the device type. You use those to make sure your background content runs up behind the status bar and home bar when it makes sense and that your foreground content never does. You accomplish that by adding this information to each of your page layouts as needed (via margin and padding settings or spacer objects).

Note, these values change as the app launches and as the orientation changes....

How to remove black bar menu from the bottom of android screen?

How do you hide/remove the useless bottom black bar?

Set your targetSdkVersion to 14 or higher.

Preferably without raising the targetSdkVersion?

Chop the bottom portion of the phone off with a very sharp axe. Note that this may void your warranty on the phone.

Remove black bar bottom of UIImagePickerController

As, in iOS7 image picker move to whole screen but prior to iOS7 you may not have full screen camera view so that you may need to apply transformation in your screen view

if your device is running iOS6 (4 inch):

CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.930);

if your device is running iOS6 (3.5 inch):

CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.260);

if your device is running on iOS7 (4 inch)

CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.670);
self.picker.cameraViewTransform = cameraTransform;


Related Topics



Leave a reply



Submit