20 #import <UIKit/UIKit.h> |
20 #import <UIKit/UIKit.h> |
21 |
21 |
22 |
22 |
23 @protocol EditableCellViewDelegate <NSObject> |
23 @protocol EditableCellViewDelegate <NSObject> |
24 |
24 |
25 -(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue; |
25 - (void)saveTextFieldValue:(NSString *)textString withTag:(NSInteger)tagValue; |
26 |
26 |
27 @end |
27 @end |
28 |
28 |
29 @interface EditableCellView : UITableViewCell <UITextFieldDelegate> { |
29 @interface EditableCellView : UITableViewCell <UITextFieldDelegate> { |
30 id<EditableCellViewDelegate> delegate; |
30 id<EditableCellViewDelegate> __weak delegate; |
31 UITextField *textField; |
31 UITextField *textField; |
32 UILabel *titleLabel; |
32 UILabel *titleLabel; |
33 NSUInteger minimumCharacters; |
33 NSUInteger minimumCharacters; |
34 NSUInteger maximumCharacters; |
34 NSUInteger maximumCharacters; |
35 BOOL respectEditing; |
35 BOOL respectEditing; |
36 |
36 |
37 @private |
37 @private |
38 NSString *oldValue; |
38 NSString *oldValue; |
39 } |
39 } |
40 |
40 |
41 @property (nonatomic,assign) id<EditableCellViewDelegate> delegate; |
41 @property (nonatomic, weak) id<EditableCellViewDelegate> delegate; |
42 @property (nonatomic,retain,readonly) UITextField *textField; |
42 @property (nonatomic, strong, readonly) UITextField *textField; |
43 @property (nonatomic,retain,readonly) UILabel *titleLabel; |
43 @property (nonatomic, strong, readonly) UILabel *titleLabel; |
44 @property (nonatomic,assign) NSUInteger minimumCharacters; |
44 @property (assign) NSUInteger minimumCharacters; |
45 @property (nonatomic,assign) NSUInteger maximumCharacters; |
45 @property (assign) NSUInteger maximumCharacters; |
46 @property (nonatomic,assign) BOOL respectEditing; |
46 @property (assign) BOOL respectEditing; |
47 @property (nonatomic,retain) NSString *oldValue; |
47 @property (nonatomic, strong) NSString *oldValue; |
48 |
48 |
49 -(void) replyKeyboard; |
49 - (void)replyKeyboard; |
50 -(void) cancel:(id) sender; |
50 - (void)cancel:(id)sender; |
51 -(void) save:(id) sender; |
51 - (void)save:(id)sender; |
52 |
52 |
53 @end |
53 @end |