forked from davdroman/Bohr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBOTextTableViewCell.h
35 lines (27 loc) · 1.06 KB
/
BOTextTableViewCell.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
//
// BOTextTableViewCell.h
// Bohr
//
// Created by David Román Aguirre on 5/6/15.
// Copyright (c) 2015 David Roman. All rights reserved.
//
#import "BOTableViewCell.h"
/// Defines an error after trying to input some new value to the cell text field.
typedef NS_ENUM(NSInteger, BOTextFieldInputError) {
BOTextFieldInputTooShortError
};
@interface BOTextTableViewCell : BOTableViewCell <UITextFieldDelegate>
/**
* Block type defining an input error that has ocurred in the cell text field.
*
* @param cell the cell affected by the input error.
* @param error the received input error.
*/
typedef void(^BOTextFieldInputErrorBlock)(BOTextTableViewCell *cell, BOTextFieldInputError error);
/// The text field on the cell.
@property (nonatomic, strong) UITextField *textField;
/// The minimum amount of non-blank characters necessary for the text field.
@property (nonatomic) IBInspectable NSInteger minimumTextLength;
/// A block defining an input error that has ocurred in the cell text field.
@property (nonatomic, copy) BOTextFieldInputErrorBlock inputErrorBlock;
@end