|
//
// UIScrollView+SVPullToRefresh.h
//
// Created by Sam Vermette on 23.04.12.
// Copyright (c) 2012 samvermette.com. All rights reserved.
//
// https://github.com/samvermette/SVPullToRefresh
//
#import <UIKit/UIKit.h>
#import <AvailabilityMacros.h>
#define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON)
#define fequalzero(a) (fabs(a) < FLT_EPSILON)
static CGFloat const SVPullToRefreshViewHeight = 60;
@class SVPullToRefreshView;
@interface UIScrollView (SVPullToRefresh)
- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler;
- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler customer:(BOOL)customer;
- (void)initPullToRefreshWithActionHandler:(void (^)(void))actionHandler;
- (void)triggerPullToRefresh;
- (CGFloat)MoveYForPullToRefresh;
@property (nonatomic, strong, readonly) SVPullToRefreshView *pullToRefreshView;
@property (nonatomic, assign) BOOL showsPullToRefresh;
@end
typedef NS_ENUM(NSUInteger, SVPullToRefreshState) {
SVPullToRefreshStateStopped = 0,
SVPullToRefreshStateTriggered,
SVPullToRefreshStateLoading,
SVPullToRefreshStatePulling
};
@interface SVPullToRefreshView : UIView
@property (nonatomic, readonly) SVPullToRefreshState state;
@property (nonatomic, readwrite) CGFloat originalTopInset;
@property (nonatomic, readwrite) CGFloat originalBottomInset;
@property (nonatomic, readwrite) CGFloat originalOffset;
- (void)setCustomView:(UIView *)view;
- (void)startAnimating;
- (void)stopAnimating;
@end
|