mirror of
https://github.com/zhigang1992/RETableViewManager.git
synced 2026-06-19 18:24:13 +08:00
Fix placeholderColor issue, update example
This commit is contained in:
@@ -13,5 +13,6 @@
|
||||
@property (strong, readwrite, nonatomic) UIColor *placeholderColor;
|
||||
|
||||
+ (id)itemWithValue:(NSString *)value placeholder:(NSString *)placeholder;
|
||||
- (id)initWithValue:(NSString *)value placeholder:(NSString *)placeholder;
|
||||
|
||||
@end
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
+ (id)itemWithValue:(NSString *)value placeholder:(NSString *)placeholder
|
||||
{
|
||||
return [[self alloc] initWithTitle:@"" value:value placeholder:placeholder];
|
||||
return [[self alloc] initWithValue:value placeholder:placeholder];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
@@ -26,4 +26,20 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithValue:(NSString *)value placeholder:(NSString *)placeholder
|
||||
{
|
||||
return [self initWithTitle:nil value:value placeholder:placeholder];
|
||||
}
|
||||
|
||||
- (id)initWithTitle:(NSString *)title value:(NSString *)value placeholder:(NSString *)placeholder
|
||||
{
|
||||
self = [super initWithTitle:title value:value placeholder:placeholder];
|
||||
if (!self)
|
||||
return nil;
|
||||
|
||||
self.placeholderColor = [UIColor lightGrayColor];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -79,6 +79,10 @@
|
||||
}];
|
||||
[section addItem:optionItem];
|
||||
|
||||
RELongTextItem *longTextItem = [RELongTextItem itemWithValue:nil placeholder:@"Multiline text field"];
|
||||
longTextItem.cellHeight = 88;
|
||||
[section addItem:longTextItem];
|
||||
|
||||
section = [[RETableViewSection alloc] initWithHeaderTitle:@"Credit card"];
|
||||
[_manager addSection:section];
|
||||
[section addItem:[RECreditCardItem item]];
|
||||
|
||||
@@ -46,13 +46,6 @@
|
||||
[weakSelf.tableView deselectRowAtIndexPath:item.indexPath animated:YES];
|
||||
[weakSelf.navigationController pushViewController:[[ListViewController alloc] initWithStyle:UITableViewStylePlain] animated:YES];
|
||||
}]];
|
||||
|
||||
RETextItem *fullLengthField = [RETextItem itemWithTitle:nil value:nil placeholder:@"Full length text field"];
|
||||
[section addItem:fullLengthField];
|
||||
|
||||
RELongTextItem *longTextItem = [RELongTextItem itemWithValue:nil placeholder:@"Multiline text field"];
|
||||
longTextItem.cellHeight = 88;
|
||||
[section addItem:longTextItem];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user