Add haptica feed back during pulling to refresh for MJRefresh by runtime.
(利用runtime为MJRefresh添加下拉刷新过程中的触觉反馈效果。)
To run the example project, clone the repo, and run pod install from the Example directory first.
- iOS 12.0 or later
- Swift 5.9.2
- Xcode 15.1
MJRefreshHaptica is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MJRefreshHaptica'If you want to use the latest features of MJRefreshHaptica, use normal external source dependencies.
pod 'MJRefreshHaptica', :git => 'https://github.com/Sfh03031/MJRefreshHaptica.git'Install and import MJRefreshHaptica
import MJRefreshHapticafind didFinishLaunchingWithOptions method in AppDelegate.swift file, add the following code:
MJRefreshHaptica.default.open(true, style: .light)the style property is a case of HapticFeedbackStyle:
public enum HapticFeedbackStyle: Int {
case light, medium, heavy
@available(iOS 13.0, *)
case soft, rigid
}It's that simple, enjoy it.
Please make an issue or pull request if you have any request.
Bug reports, Documentation, or tests, are always welcome as well.
Sfh03031, sfh894645252@163.com
MJRefreshHaptica is available under the MIT license. See the LICENSE file for more info.