Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🧭 Custom Navigation in SwiftUI

A state-driven navigation flow — Splash → Onboarding → Home — without NavigationStack.

Platform Swift SwiftUI Xcode Stars Last Commit

📖 Overview

CustomNavigationsSwiftUI demonstrates how to drive an app's top-level flow with a simple state machine instead of relying on NavigationStack or TabView. A single RootNavigations view owns an AppState enum (splash, onboarding, home) and swaps the visible screen with animated transitions as the state changes. The onboarding gate is persisted with @AppStorage, so returning users skip straight from the splash screen to the home screen.

✨ Features

  • 🔀 Enum-based AppState (splash / onboarding / home) that decides which screen is shown.
  • ⏱️ Timed splash screen that auto-advances after a short delay before routing the user.
  • 💾 Persistent onboarding gate using @AppStorage("isOnboardingDone") so it only runs once.
  • 🎬 Animated screen swaps driven by withAnimation on state changes.
  • 🧩 onFinish callback from onboarding cleanly hands control back to the root navigator.
  • 🍃 Pure SwiftUI, no external dependencies.

📸 Preview

Custom navigation flow overview App state routing Onboarding gate

🚀 Getting Started

git clone https://github.com/ahmetbostanciklioglu/CustomNavigationsSwiftUI.git
cd CustomNavigationsSwiftUI
open CustomNavigationsSwiftUI.xcodeproj

Then select a simulator and press Command-R to build and run.

📋 Requirements

  • iOS 26.1+
  • Xcode 16 or later
  • Swift 5.0

🧑‍💻 Author

Ahmet Bostancıklıoğlu@ahmetbostanciklioglu · ahmetbostancikli@gmail.com

⭐ If this helped you, consider giving the repo a star!

About

State-driven SwiftUI navigation: splash → onboarding → home via an AppState enum, no NavigationStack.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages