Skip to content

gudkeshkumar/MasterSwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI Chapters Navigation App

A native iOS application demonstrating SwiftUI best practices, SOLID principles, and modern Apple frameworks through a chapter-based learning interface.

📱 Overview

This app provides a clean, navigable interface for exploring 19 SwiftUI chapters, from basic text handling to advanced animations and gestures. Built with the latest SwiftUI features and following industry best practices.

✨ Features

  • Chapter List View: Scrollable list of all SwiftUI learning chapters
  • Detail Navigation: Tap any chapter to view its detail screen
  • SF Symbols Integration: Each chapter has a relevant SF Symbol icon
  • Modern UI: Gradient-styled icons with clean, iOS-native design
  • Type-Safe Navigation: Leveraging SwiftUI's NavigationStack

🏗️ Architecture

Design Patterns

  • MVVM (Model-View-ViewModel): Clear separation of concerns
  • Protocol-Oriented Programming: Flexible, testable data layer
  • Dependency Injection: Loose coupling between components

SOLID Principles

Single Responsibility Principle

  • Each component has one well-defined purpose
  • ChapterDataProvider handles data retrieval
  • ChaptersViewModel manages business logic
  • Views focus solely on UI presentation

Open/Closed Principle

  • Protocol-based ChapterDataProviding allows extension without modification
  • New data sources can be added by conforming to the protocol

Liskov Substitution Principle

  • Any ChapterDataProviding implementation can replace another

Interface Segregation Principle

  • Focused protocols with minimal required methods

Dependency Inversion Principle

  • ViewModel depends on ChapterDataProviding protocol, not concrete implementation

📂 Project Structure

ChaptersApp/
├── Models/
│   └── Chapter.swift                 // Data model with Identifiable & Hashable
├── Protocols/
│   └── ChapterDataProviding.swift    // Data provider protocol
├── Data/
│   └── ChapterDataProvider.swift     // Concrete data implementation
├── ViewModels/
│   └── ChaptersViewModel.swift       // Observable view model
├── Views/
│   ├── ChaptersHomeView.swift        // Main navigation container
│   ├── ChapterRowView.swift          // Reusable list row component
│   └── ChapterDetailView.swift       // Detail screen (dummy)
└── ChaptersApp.swift                 // App entry point

🛠️ Technologies & Frameworks

  • SwiftUI: Declarative UI framework
  • Observation Framework: @Observable macro (iOS 17+)
  • NavigationStack: Type-safe navigation
  • SF Symbols: Apple's icon system
  • Swift 5.9+: Latest language features

📋 Requirements

  • iOS 17.0+
  • Xcode 15.0+
  • Swift 5.9+

🔄 Future Enhancements

  • Search functionality
  • Bookmark favorite chapters
  • Progress tracking
  • Dark mode refinements
  • iPad optimization
  • Chapter content implementation
  • Code examples for each chapter
  • Interactive tutorials
  • Offline mode

📚 Chapters Included

  1. Chapter 2: Getting Started with SwiftUI and Working with Text
  2. Chapter 3: Working with Images
  3. Chapter 4: Layout User Interfaces with Stacks
  4. Chapter 5: Understanding ScrollView and Building a Carousel UI
  5. Chapter 6: Working with SwiftUI Buttons and Gradient
  6. Chapter 7: Understanding State and Binding
  7. Chapter 8: Implementing Path and Shape for Line Drawing and Pie Charts
  8. Chapter 9: Basic Animations and Transitions
  9. Chapter 10: Understanding Dynamic List, ForEach and Identifiable
  10. Chapter 11: Working with Navigation UI and Navigation Bar Customization
  11. Chapter 12: Playing with Modal Views, Floating Buttons and Alerts
  12. Chapter 13: Building a Form with Picker, Toggle and Stepper
  13. Chapter 14: Data Sharing with Combine and Environment Objects
  14. Chapter 15: Building a Registration Form with Combine and View Model
  15. Chapter 16: Working with Swipe-to-Delete, Context Menu and Action Sheets
  16. Chapter 17: Using Gestures
  17. Chapter 18: Displaying an Expandable Bottom Sheet Using Presentation Detents
  18. Chapter 19: Creating a Tinder-like UI with Gestures and Animations
  19. Chapter 20: Creating an Apple Wallet like Animation and View Transition

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style Guidelines

  • Follow Swift API Design Guidelines
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Include SwiftUI previews for all views
  • Write unit tests for business logic

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Gudkesh Kumar

🙏 Acknowledgments

  • Apple's SwiftUI documentation
  • SF Symbols library
  • SwiftUI community and contributors
  • Inspired by SwiftUI learning resources

📞 Support

If you have questions or need help:

  • Open an issue on GitHub
  • Check existing issues for solutions
  • Review the documentation
  • Contact the maintainer

Built with ❤️ using SwiftUI

About

An app which was created to learn the SwiftUI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages