Skip to content

Commit

Permalink
Merge pull request #7864 from hansemannn/TIMOB-20591
Browse files Browse the repository at this point in the history
[TIMOB-20591] iOS: Rename "tableSeparatorInsets" to "listSeparatorInsets" in Ti.UI.ListView
  • Loading branch information
AngelkPetkov committed Mar 18, 2016
2 parents a9163e7 + 6863efa commit 6705efb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
26 changes: 23 additions & 3 deletions apidoc/Titanium/UI/ListView.yml
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ properties:
summary: The insets for list view separators (applies to all cells). This property is applicable on iOS 7 and greater.
deprecated:
since: "5.2.0"
notes: Use tableSeparatorInsets instead
notes: Use listSeparatorInsets instead
description: |
In iOS 7 and later, cell separators do not extend all the way to the edge of the list view.
This property sets the default inset for all cells in the table.
Expand Down Expand Up @@ -879,6 +879,9 @@ properties:
availability: creation

- name: tableSeparatorInsets
deprecated:
since: "5.4.0"
notes: Use listSeparatorInsets instead
summary: The insets for the table view header and footer. This property is applicable on iOS 7 and greater.
description: |
In iOS 7 and later, cell separators do not extend all the way to the edge of the list view. Set this to a
Expand All @@ -891,13 +894,30 @@ properties:
left:10,
right:10
});



type: Dictionary
since: "5.2.0"
osver: {ios: {min: "7.0"}}
platforms: [iphone, ipad]

- name: listSeparatorInsets
summary: The insets for the list view header and footer. This property is applicable on iOS 7 and greater.
description: |
In iOS 7 and later, cell separators do not extend all the way to the edge of the list view. Set this to a
dictionary with two keys, `left` specifying inset from left edge and `right` specifying the inset from the
right edge. If the rowSeparatorInsets is not set, the listSeparatorInsets will also set the cell insets.
For example:

listView.setListSeparatorInsets({
left:10,
right:10
});

type: Dictionary
since: "5.4.0"
osver: {ios: {min: "7.0"}}
platforms: [iphone, ipad]

- name: rowSeparatorInsets
summary: The insets for list view cells (applies to all cells). This property is applicable on iOS 7 and greater.
Expand Down
12 changes: 10 additions & 2 deletions iphone/Classes/TiUIListView.m
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,20 @@ -(NSInteger)sectionForSearchSection:(NSInteger)section

-(void)setSeparatorInsets_:(id)arg
{
DEPRECATED_REPLACED(@"UI.ListView.separatorInsets", @"5.2.0", @"UI.ListView.tableSeparatorInsets");
[self setTableSeparatorInsets_:arg];
DEPRECATED_REPLACED(@"UI.ListView.separatorInsets", @"5.2.0", @"UI.ListView.listSeparatorInsets");
[self setListSeparatorInsets_:arg];
}

-(void)setTableSeparatorInsets_:(id)arg
{
DEPRECATED_REPLACED(@"UI.ListView.tableSeparatorInsets", @"5.4.0", @"UI.ListView.listSeparatorInsets");
[self setListSeparatorInsets_:arg];
}

-(void)setListSeparatorInsets_:(id)arg
{
[self tableView];

if ([arg isKindOfClass:[NSDictionary class]]) {
CGFloat left = [TiUtils floatValue:@"left" properties:arg def:_defaultSeparatorInsets.left];
CGFloat right = [TiUtils floatValue:@"right" properties:arg def:_defaultSeparatorInsets.right];
Expand Down

0 comments on commit 6705efb

Please sign in to comment.