DEV Community

Cover image for SwiftUI and Navigation
Kyra
Kyra

Posted on

1

SwiftUI and Navigation

I’m currently developing a multiplatform app and am having issues with both the tab control and sidebar on the iPhone and iPad devices. Ideally I want the user to be able to switch between the two if they prefer one over the other... and the switching currently works great but I've noticed minor issues with both formats.

Specifically my app can go up to four levels but in this sample I have three. The left sidebar or tabs has four choices, the middle has it's own choices, and the right has a text box showing what was clicked on. With the sidebar option I notice the right screen doesn't change when you click on the sidebar (though the center does). Also the sidebar clicks print out text (with the onChange modifier) but don't register in the view.

Image description

I was going to lock it down to just tab control for now so the app is easily useable but noticed if you click to the third level then switch tabs the back button on the phone changes (from saying back) to reflect the newly selected tab but the content shows the old view.

Image description

Using tab control on the iPad the middle sidebar (now on the left side)updates when the tab is changed but again, like with the phone, the right pane shows the old content.

Image description

Just curious if anyone knows of a good multiplatform SwiftUI tutorial that would help me get this working. In my actual app the right view sometimes has two levels with a back button.

Either way hope your day is going good!

Sentry image

Your Users Hate Jank. Let’s Fix That.

This on-demand workshop walks through how to monitor and debug mobile apps using Sentry, with focus on:

  • Mobile vitals (TTID, TTFD, etc.)
  • Session Replay for mobile
  • Profiling & tracing across the stack
  • Get the tools and signal you need—without the noise.

Watch here 🎥

Top comments (0)

Runner H image

New Hire? Let AI Handle Onboarding Tasks

From welcome docs to checklists to calendar invites — Runner H automates the entire onboarding workflow across Notion, Google Calendar, and forms.

Try Runner H