@@ -555,7 +555,7 @@ - (void)replaceData:(NSMutableArray *)data animation:(UITableViewRowAnimation)an
555
555
// won't have any problems in the case that it is actually nil.
556
556
TiUITableViewProxy *ourProxy = (TiUITableViewProxy *)[self proxy ];
557
557
558
- NSUInteger oldCount = [ ourProxy sectionCount ] ;
558
+ NSUInteger oldCount = ourProxy. sectionCount . unsignedIntegerValue ; ;
559
559
560
560
for (TiUITableViewSectionProxy *section in [(TiUITableViewProxy *)[self proxy ] internalSections ]) {
561
561
if ([section parent ] == ourProxy) {
@@ -1313,7 +1313,8 @@ - (void)updateSearchResultIndexes
1313
1313
}
1314
1314
NSEnumerator *searchResultIndexEnumerator;
1315
1315
if (searchResultIndexes == nil ) {
1316
- searchResultIndexes = [[NSMutableArray alloc ] initWithCapacity: [(TiUITableViewProxy *)[self proxy ] sectionCount ]];
1316
+ NSUInteger sectionCount = [(TiUITableViewProxy *)[self proxy ] sectionCount ].unsignedIntegerValue ;
1317
+ searchResultIndexes = [[NSMutableArray alloc ] initWithCapacity: sectionCount];
1317
1318
searchResultIndexEnumerator = nil ;
1318
1319
} else {
1319
1320
searchResultIndexEnumerator = [searchResultIndexes objectEnumerator ];
@@ -2124,7 +2125,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)ourTableView
2124
2125
return 1 ;
2125
2126
}
2126
2127
// One quirk of UITableView is that it really hates having 0 sections. Instead, supply 1 section, no rows.
2127
- NSUInteger result = [(TiUITableViewProxy *)[self proxy ] sectionCount ];
2128
+ NSUInteger result = [(TiUITableViewProxy *)[self proxy ] sectionCount ]. unsignedIntegerValue ;
2128
2129
return MAX (1 , result);
2129
2130
}
2130
2131
@@ -2166,7 +2167,7 @@ - (void)tableView:(UITableView *)ourTableView commitEditingStyle:(UITableViewCel
2166
2167
[table beginUpdates ];
2167
2168
if (emptySection) {
2168
2169
NSIndexSet *thisSectionSet = [NSIndexSet indexSetWithIndex: [indexPath section ]];
2169
- if ([(TiUITableViewProxy *)[self proxy ] sectionCount ] > 0 ) {
2170
+ if ([(TiUITableViewProxy *)[self proxy ] sectionCount ]. unsignedIntegerValue > 0 ) {
2170
2171
[table deleteSections: thisSectionSet withRowAnimation: UITableViewRowAnimationFade];
2171
2172
} else // There always must be at least one section. So instead, we have it reload to clear out the header and footer, etc.
2172
2173
{
0 commit comments