upcarta
  • Sign In
  • Sign Up
  • Explore
  • Search

How to show and hide a sidebar in a SwiftUI macOS app

  • Article
  • Jun 26, 2021
  • #ComputerProgramming
Sarun W.
@sarunw
(Author)
sarunw.com
Read on sarunw.com
1 Recommender
1 Mention
Users can resize a sidebar by dragging it around the edge. And if they drag it far enough, the sidebar will be close, and no way to get it back. This article will tell you how to m... Show More

Users can resize a sidebar by dragging it around the edge. And if they drag it far enough, the sidebar will be close, and no way to get it back.

This article will tell you how to mitigate this problem by adding other options to show and hide the sidebar.

Here is the problem in action. Once the sidebar is collapsed, there is no way to recover from it. Drag the left edge would resize the window, not bring the sidebar back.

Show Less
Recommend
Post
Save
Complete
Collect
Mentions
See All
StewartLynch @StewartLynch · Mar 17, 2023
  • Post
  • From Twitter
Another great article by @sarunw and this time, the adds are practically invisible. Thanks. A much less distracting lead.
  • upcarta ©2025
  • Home
  • About
  • Terms
  • Privacy
  • Cookies
  • @upcarta