// // IfishCardScrollView.h // ShotViewAnimation // // Created by imac on 16/10/25. // Copyright © 2016年 xiang. All rights reserved. // #import typedef NS_ENUM(NSInteger, CardMoveDirection) { CardMoveDirectionNone, CardMoveDirectionLeft, CardMoveDirectionRight }; @protocol CardScrollViewDataSource - (NSInteger)numberOfCards; - (UIView *)cardReuseView:(UIView *)reuseView atIndex:(NSInteger)index; @optional - (void)deleteCardWithIndex:(NSInteger)index; @end @protocol CardScrollViewDelegate - (void)updateCard:(UIView *)card withProgress:(CGFloat)progress direction:(CardMoveDirection)direction; @end @interface IfishCardScrollView : UIView @property (nonatomic, weak) idcardDataSource; @property (nonatomic, weak) idcardDelegate; @property (nonatomic, assign) BOOL canDeleteCard; @property (nonatomic, strong) UIScrollView *scrollView; - (void)loadCard; - (NSArray *)allCards; - (NSInteger)currentCard; - (CGPoint)contentOffsetWithIndex:(NSInteger)index; @end