ShakeToRevealImageView is a dynamic and customizable iOS library designed to add an interactive 'shake to reveal' effect to any image. With this library, developers can easily implement a fun and engaging user experience by enabling images to be revealed with a shake gesture. It provides full customization over the UI overlay, allowing developers to adjust the color, opacity, and design, while seamlessly integrating haptic feedback using UIImpactFeedbackGenerator. This flexible solution gives developers complete control over the appearance and interaction, making it effortless to enhance user engagement with just a few lines of code
- Support Overlay Color
- Support Different Haptic Feedback
- Support All UIImageView Properties
- iOS 15+
- XCode 15+
- Swift 5.9+
You can install ShakeToRevealImageView
using Swift Package Manager by:
- Go to
Xcode
->File
->Add Package Dependencies...
- Add package URL [https://github.com/jay-buddhdev/ShakeToRevealImageView]
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
Navigate to project root folder to integrate pod.
$ pod init
It will generate Podfile
for your project. To integrate SSStoryStatus into your project specify it in your Podfile
:
platform :ios, '17.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ShakeToRevealImageView'
end
Then, run the following command:
$ pod install
It will generate <Project>.xcworkspace
file. From now on you should open the project using this file.
If you face build error Command PhaseScriptExecution failed with a nonzero exit code
then follow this steps:
Go to project Build Settings
-. Search for User Script Sandboxing
-> Set to No
.
Refrence - User Script Sandboxing
First import required package:
import ShakeToRevealImageView
ShakeToRevealImageView
class in UIImageView in Storyboard
Add feedbackStyle in ViewController
imageView.feedbackStyle = .heavy
Support it by joining stargazers ⭐ for this repository.
Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! 💪
Check out our Contributing Guide for ideas on contributing.
For bugs, feature feature requests, and discussion use GitHub Issues.
Distributed under the MIT license. See LICENSE for details.