BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

SwiftUI MacOs - any way to determine if main content view is in a tabbed window?

Forums > SwiftUI

I need to adjust some padding specifically when tabs or the tab bar is present in the window my view resides in. Not sure what element / view / controller to query or what key / method to query it for.

This is indirectly caused by me using a custom titlebar. If I could turn off the 'rename' function and other title bar 'bling' then I could revert back to a more standard title... so anything for that route might make the tab question moot.

If curious, I am redoing an App I did like 15 years ago in Objective-C... it is a GUI for JPEGTRAN:


Save 50% in my Black Friday sale.

SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.