forked from CEWendel/SWTableViewCell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSWTableViewCell.h
More file actions
51 lines (40 loc) · 1.87 KB
/
Copy pathSWTableViewCell.h
File metadata and controls
51 lines (40 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// SWTableViewCell.h
// SWTableViewCell
//
// Created by Chris Wendel on 9/10/13.
// Copyright (c) 2013 Chris Wendel. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <UIKit/UIGestureRecognizerSubclass.h>
#import "SWCellScrollView.h"
#import "SWLongPressGestureRecognizer.h"
#import "SWUtilityButtonTapGestureRecognizer.h"
#import "NSMutableArray+SWUtilityButtons.h"
#import "SWConstants.h"
@class SWTableViewCell;
typedef enum {
kCellStateCenter,
kCellStateLeft,
kCellStateRight
} SWCellState;
@protocol SWTableViewCellDelegate <NSObject>
@optional
- (void)swipeableTableViewCell:(SWTableViewCell *)cell didTriggerLeftUtilityButtonWithIndex:(NSInteger)index;
- (void)swipeableTableViewCell:(SWTableViewCell *)cell didTriggerRightUtilityButtonWithIndex:(NSInteger)index;
- (void)swipeableTableViewCell:(SWTableViewCell *)cell scrollingToState:(SWCellState)state;
- (BOOL)swipeableTableViewCellShouldHideUtilityButtonsOnSwipe:(SWTableViewCell *)cell;
- (BOOL)swipeableTableViewCell:(SWTableViewCell *)cell canSwipeToState:(SWCellState)state;
@end
@interface SWTableViewCell : UITableViewCell
@property (nonatomic, strong) NSArray *leftUtilityButtons;
@property (nonatomic, strong) NSArray *rightUtilityButtons;
@property (nonatomic, weak) id <SWTableViewCellDelegate> delegate;
@property (nonatomic, strong) SWCellScrollView *cellScrollView;
@property (nonatomic, weak) UITableView *containingTableView;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier containingTableView:(UITableView *)containingTableView leftUtilityButtons:(NSArray *)leftUtilityButtons rightUtilityButtons:(NSArray *)rightUtilityButtons;
- (void)setCellHeight:(CGFloat)height;
- (void)setBackgroundColor:(UIColor *)backgroundColor;
- (void)hideUtilityButtonsAnimated:(BOOL)animated;
- (void)setAppearanceWithBlock:(void (^) ())appearanceBlock force:(BOOL)force;
@end