avatarSorin Dolha

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

558

Abstract

f="https://dlhsoft.com/ganttis">DlhSoft Ganttis framework</a> updates that are to come soon!)</figcaption></figure><p id="5b09">If you develop an iOS app and you run it on a Mac, you might see something like the first image above. Notice the white bar at the top. Indeed. It’s the empty-on-Mac iOS app status bar!</p><p id="f5cf">Naturally, if you don’t use the status bar at all, you want to correct this behavior, and — while still showing the standard status info on iPhones and iPads — adapt the app to look good on macOS as well.</p><p id="4013">It’s an

Options

easy fix, once you know what that white space <i>actually</i> <i>is</i>. But I did fight with it for an hour or so today, so (I guess) I should share! 😬</p><p id="426e">With or without SwiftUI:</p> <figure id="8c68"> <div> <div>

            <iframe class="gist-iframe" src="/gist/SDolha/56cb3d51b44097a53b738576c6086999.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
          </div>
        </div>
    </figure></iframe></div></div></figure></article></body>

What’s that ugly white space at the top of your “Designed for iPad” app when it runs on an M1 Mac?

It might be… the status bar! Here’s a small snippet to fix it for good.

Screenshots from a sample app that I’m working on (for some DlhSoft Ganttis framework updates that are to come soon!)

If you develop an iOS app and you run it on a Mac, you might see something like the first image above. Notice the white bar at the top. Indeed. It’s the empty-on-Mac iOS app status bar!

Naturally, if you don’t use the status bar at all, you want to correct this behavior, and — while still showing the standard status info on iPhones and iPads — adapt the app to look good on macOS as well.

It’s an easy fix, once you know what that white space actually is. But I did fight with it for an hour or so today, so (I guess) I should share! 😬

With or without SwiftUI:

Swiftui
Macos
Designed For Ipad
White
Status
Recommended from ReadMedium