Latest 0.1.0
Homepage https://github.com/rezabina86/RBThrottler
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Throttling wraps a block of code with throttling logic, guaranteeing that an action will never be called more than once each specified interval.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

var throttler : Throttler?
var counter = 0

override func viewDidLoad() {
   super.viewDidLoad()
   self.throttler = Throttler(seconds: 5)
}

@IBAction func buttonDidTapped(_ sender: UIButton) {
   self.counter += 1
   self.throttler?.throttle(block: {
      print(self.counter)
   })
}

Requirements

Installation

RBThrottler is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RBThrottler'

Author

rezabina86, [email protected]

License

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

Latest podspec

{
    "name": "RBThrottler",
    "version": "0.1.0",
    "summary": "Throttling guaranteeing that an action will never be called more than once",
    "description": ""Throttling wraps a block of code with throttling logic, guaranteeing that an action will never be called more than once each specified interval. Throttle is typically used inside search boxes in order to limit the number of backend requests while user is typing for a query."",
    "homepage": "https://github.com/rezabina86/RBThrottler",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "rezabina86": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rezabina86/RBThrottler.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "RBThrottler/Classes/**/*"
}

Pin It on Pinterest

Share This