Skip to content

Instantly share code, notes, and snippets.

@akisute
Created July 11, 2009 03:54
Show Gist options
  • Save akisute/145061 to your computer and use it in GitHub Desktop.
Save akisute/145061 to your computer and use it in GitHub Desktop.
@interface YTTextFieldCell : UITableViewCell<UITextFieldDelegate, YTCustomCell> {
id delegate;
UILabel *label;
UITextField *textField;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) NSString *label;
@property (nonatomic, retain) NSString *value;
@property (nonatomic, retain) NSString *placeholder;
@implementation YTTextFieldCell
@synthesize delegate;
- (NSString *)label
{
return label.text;
}
- (void)setLabel:(NSString *)aLabel
{
label.text = aLabel;
}
- (NSString *)value
{
return textField.text;
}
- (void)setValue:(NSString *)aValue
{
textField.text = aValue;
}
- (NSString *)placeholder
{
return textField.placeholder;
}
- (void)setPlaceholder:(NSString *)aPlaceholder
{
textField.placeholder = aPlaceholder;
}
- (CGFloat)height
{
return 44.0;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment