-
Notifications
You must be signed in to change notification settings - Fork 409
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Another way to hide tabbar on NSTabView
TabView{}
.introspect(.window, on: .macOS(.v15, .v26)) { window in
guard let toolbar = window.toolbar else { return }
for item in toolbar.items {
if item.label == "Navigation Tab Bar" {
// Remove border
item.isBordered = false
// Hide item instead of removing to avoid system recreation
item.view?.isHidden = true
// Set width to 0 using constraints to prevent occupying toolbar space
item.view?.widthAnchor.constraint(equalToConstant: 0).isActive = true
}
}
}
Checklist
- I have read the README before submitting this report.
- This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Version information
No response
Destination operating system
No response
Xcode version information
No response
Swift Compiler version information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working