Skip to content

Commit

Permalink
Merge pull request #74 from eta-ai/item-selection-style
Browse files Browse the repository at this point in the history
Support item selection style
  • Loading branch information
Pavlo Aksonov committed Feb 9, 2016
2 parents 4160b43 + 375d45c commit 6cedfcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RNTableView/RNTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ -(UITableViewCell* )tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS
if ([item[@"transparent"] intValue]) {
cell.backgroundColor = [UIColor clearColor];
}
if (item[@"selectionStyle"]) {
cell.selectionStyle = [item[@"selectionStyle"] intValue];
}

return cell;
}
Expand Down
6 changes: 6 additions & 0 deletions RNTableView/RNTableViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ - (NSDictionary *)constantsToExport {
@"Delete": @(UITableViewCellEditingStyleDelete),
@"Insert": @(UITableViewCellEditingStyleInsert)
},
@"CellSelectionStyle": @{
@"None": @(UITableViewCellSelectionStyleNone),
@"Blue": @(UITableViewCellSelectionStyleBlue),
@"Gray": @(UITableViewCellSelectionStyleGray),
@"Default": @(UITableViewCellSelectionStyleDefault)
},
@"SeparatorStyle": @{
@"None": @(UITableViewCellSeparatorStyleNone),
@"Line": @(UITableViewCellSeparatorStyleSingleLine),
Expand Down

0 comments on commit 6cedfcf

Please sign in to comment.