2022-05-30
2462
#swift
Rupesh Chaudhari
113841
May 30, 2022 ⋅ 8 min read

How to create a custom, collapsible sidebar in SwiftUI

Rupesh Chaudhari Rupesh is a programming enthusiast who is currently working with React Native to build beautiful hybrid mobile apps. He likes to solve competitive programming puzzles and enjoys gaming in his free time.

Recent posts:

TypeScript logo over a pink and white background.

Drizzle vs. Prisma: Which ORM is best for your project?

Compare Prisma and Drizzle ORMs to learn their differences, strengths, and weaknesses for data access and migrations.

Temitope Oyedele
Nov 21, 2024 ⋅ 10 min read
Practical Implementation Of The Rule Of Least Power For Developers

Practical implementation of the Rule of Least Power for developers

It’s easy for devs to default to JavaScript to fix every problem. Let’s use the RoLP to find simpler alternatives with HTML and CSS.

Timonwa Akintokun
Nov 21, 2024 ⋅ 8 min read
Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 ⋅ 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 ⋅ 13 min read
View all posts

6 Replies to "How to create a custom, collapsible sidebar in SwiftUI"

  1. This is a really complete and attentive tutorial. Thank you very much. Better than any other tutorial. I hope to translate in my native. But in the last step, explaining of MenuLinks tells to create a new swift-view file? If not, where do I put the code?

  2. P.s. Pointing out there is something wrong in your tutorial code. Line “…struct SideMenu: View {@Binding var isSidebarVisible: Bool…” and line “struct Sidebar: View {@Binding var isSidebarVisible: Bool” are the same thing. Unless you describe this as the same, the menu column is not visible. SideMenu should be written as Sidebar.

Leave a Reply