A custom iOS ImageView that creates a scratch card effect, allowing users to swipe away a mask to reveal content underneath.
MCScratchImageView is a custom iOS ImageView component that creates a scratch card effect. It allows developers to overlay a mask image on top of any view, which users can swipe away to reveal underlying content. This solves the need for interactive, engaging UI elements in iOS apps without building scratch functionality from scratch.
iOS developers building apps that require interactive reward systems, promotional content, or gamified user experiences where scratch-to-reveal interactions are needed.
Developers choose MCScratchImageView because it provides a ready-to-use, customizable scratch card component with progress tracking, reducing development time compared to implementing similar functionality manually.
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both code initialization and Storyboard use, with straightforward API methods like setMaskImage(_:spotRadius:) for quick setup.
Includes delegate method mcScratchImageView(_:didChangeProgress:) to monitor scratching progress, enabling actions like automatic reveal at thresholds (e.g., 80% progress).
Allows any UIImage as the scratchable mask with adjustable touch radius, providing visual flexibility for different design needs.
Offers methods like scratchAll() to reveal all content programmatically, adding versatility for triggered interactions.
Built for Swift 4.0, which is several versions behind current standards, potentially causing compatibility issues with modern Xcode projects and Swift features.
Lacks support for saving scratch state, multi-layer effects, or custom animations, making it unsuitable for complex interactive scenarios.
The README warns against directly setting the image or touch radius, indicating potential fragility and limited low-level customization options.