forked from 3lvis/Form
-
Notifications
You must be signed in to change notification settings - Fork 9
/
FORMBaseFieldCell.h
executable file
·45 lines (28 loc) · 1.29 KB
/
FORMBaseFieldCell.h
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
@import UIKit;
#import "FORMFieldHeadingLabel.h"
#import "FORMTextField.h"
#import "FORMFieldHeadingLabel.h"
#import "FORMField.h"
static const CGFloat FORMFieldCellMarginTop = 30.0f;
static const CGFloat FORMFieldCellMarginBottom = 10.0f;
static const NSInteger FORMFieldCellMargin = 10.0f;
static const NSInteger FORMFieldCellItemSmallHeight = 1.0f;
static const NSInteger FORMFieldCellItemHeight = 85.0f;
static const CGFloat FORMTextFieldCellMarginX = 10.0f;
static const CGFloat FORMFieldCellBorderWidth = 1.0f;
static const CGFloat FORMFieldCellCornerRadius = 5.0f;
static const CGFloat FORMFieldCellLeftMargin = 10.0f;
@protocol FORMBaseFieldCellDelegate;
@interface FORMBaseFieldCell : UICollectionViewCell
@property (nonatomic, strong) FORMFieldHeadingLabel *headingLabel;
@property (nonatomic, strong) FORMField *field;
@property (nonatomic, getter = isDisabled) BOOL disabled;
@property (nonatomic, weak) id <FORMBaseFieldCellDelegate> delegate;
- (void)updateFieldWithDisabled:(BOOL)disabled;
- (void)updateWithField:(FORMField *)field;
- (void)validate;
@end
@protocol FORMBaseFieldCellDelegate <NSObject>
- (void)fieldCell:(UICollectionViewCell *)fieldCell updatedWithField:(FORMField *)field;
- (void)fieldCell:(UICollectionViewCell *)fieldCell processTargets:(NSArray *)targets;
@end