Adds image and closure action support to UIMenuItem for iOS development.
MenuItemKit is an iOS library that extends UIMenuItem to support images and closure-based actions, replacing the traditional selector-based approach. It simplifies the creation of custom context menus by eliminating boilerplate responder chain code, allowing developers to define menu behavior directly with closures or blocks.
iOS developers working with UIKit who need to customize UIMenuItem instances with images or more flexible action handling, particularly in Swift or Objective-C projects.
Developers choose MenuItemKit for its minimal API and automatic integration, which reduces complexity and potential errors compared to manual UIKit menu implementations, while maintaining full compatibility with both Swift and Objective-C.
UIMenuItem with image and closure(block) action
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers only two core methods, reducing complexity and making adoption straightforward without a steep learning curve.
Replaces selector callbacks with Swift closures or Objective-C blocks, cleaning up code and eliminating boilerplate for action handling.
Allows attaching images to UIMenuItem via a convenience initializer, enabling richer visual interfaces without custom drawing code.
Handles responder chain setup internally, so developers don't need to add extra code in views or controllers, simplifying implementation.
Relies on UIMenuController, which is deprecated from iOS 16, limiting long-term viability and requiring migration to UIEditMenuInteraction.
Exclusively for UIKit, making it unsuitable for projects adopting SwiftUI's native menu systems and declarative syntax.
Focuses on basic image and closure support; lacks built-in capabilities for animations, validation, or complex menu state management.