/MUKScrollTrigger

An observer of UIScrollView which triggers when a certain amount is scrolled. You can use it to achieve infinite scrolling of a table view.

Primary LanguageObjective-CMIT LicenseMIT

MUKScrollTrigger

CI Status Version License Platform

MUKScrollTrigger observes a UIScrollView instance and it monitors scrolled amount. When a threshold is passed, it triggers. This mechanism could be used to achieve infinite scroll of a table view, for example.

Usage

self.trigger = [[MUKScrollTrigger alloc] initWithScrollView:scrollView test:^(MUKScrollTrigger *trigger) {
	return trigger.scrolledFraction.trailing.height > 0.95f;
}];
[self.trigger addTarget:self action:@selector(scrollTriggerActivated:)];

Requirements

  • iOS 7 SDK.
  • Minimum deployment target: iOS 7.

Installation

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

pod "MUKScrollTrigger"

Author

Marco Muccinelli, muccymac@gmail.com

License

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