Skip to content

Conversation

@mithilP007
Copy link

Summary

This PR adds SwiftUI support to SideMenu, resolving #637.

Changes

  1. New SwiftUI File: Added SideMenuSwiftUI.swift containing:

    • A View extension with .sideMenu() modifier
    • SideMenuModifier ViewModifier implementation
    • Full SwiftUI compatibility for iOS 13.0+
  2. Documentation: Updated README.md with:

    • Complete SwiftUI implementation section
    • Usage examples showing ContentView and MenuView
    • Integration instructions for SwiftUI projects

Implementation Details

The SwiftUI integration provides a familiar modifier-based API:

  • Uses @Binding for state management
  • Supports custom menu views via closure
  • Includes backdrop overlay with tap-to-dismiss
  • Follows SwiftUI best practices and conventions

Testing

Tested with SwiftUI projects on iOS 13.0+ simulators.

Related Issue

Fixes #637


About Me

Hi, I'm Mithil P., passionate about open source and improving developer experience with modern SwiftUI tools. If you value my contributions, please support me via GitHub Sponsors so I can continue delivering value to libraries like SideMenu!

Adds SwiftUI compatibility layer with View extension and ViewModifier.

This implementation provides a simple way to integrate SideMenu functionality into SwiftUI apps using a familiar modifier pattern.

Related to issue jonkykong#637
Documents how to use the new SwiftUI View modifier for integrating SideMenu in SwiftUI applications.

Includes complete code example with ContentView and MenuView implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SwiftUI Support

1 participant