Skip to content

Add haptica feed back during pulling to refresh for MJRefresh by runtime.(利用runtime为MJRefresh添加下拉刷新过程中的触觉反馈效果。)

License

Notifications You must be signed in to change notification settings

Sfh03031/MJRefreshHaptica

Repository files navigation

MJRefreshHaptica

CI Status Version License Platform

Introduction

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.

DeepWiki

Requirements

  • iOS 12.0 or later
  • Swift 5.9.2
  • Xcode 15.1

Installation

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'

Usage

Install and import MJRefreshHaptica

import MJRefreshHaptica

find 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.

Contributing

Please make an issue or pull request if you have any request.

Bug reports, Documentation, or tests, are always welcome as well.

Author

Sfh03031, sfh894645252@163.com

License

MJRefreshHaptica is available under the MIT license. See the LICENSE file for more info.

About

Add haptica feed back during pulling to refresh for MJRefresh by runtime.(利用runtime为MJRefresh添加下拉刷新过程中的触觉反馈效果。)

Resources

License

Stars

Watchers

Forks

Packages

No packages published