Может ли кто-нибудь подтвердить мои подозрения в этой строке кода.
NSUInteger newPath[] = {[indexPath section],0};
Я почти уверен, что это массив C NSUIntegers.
Я прав насчет этого?
Вы можете даже сделать массивы C объектов Objective C?
Вот код в контексте:
-(UITableViewCellEditingStyle)tableView:(UITableView *) tableViewEditingStyleForRowAtIndexPath:(NSIndexPath*)indexPath{
if ([self isToManyRelationshipSection:[indexPath section]]) {
NSUInteger newPath[] = {[indexPath section],0};
NSIndexPath *row0IndexPath = [NSIndexPath indexPathWithIndexes:newPath length:2];
NSString *rowKey = [rowKeys nestedObjectAtIndexPath:row0IndexPath];
NSString *rowLabel = [rowLabels nestedObjectAtIndexPath:row0IndexPath];
NSMutableSet *rowSet = [managedObject mutableSetValueForKey:rowKey];//!!!: to-many?
NSArray *rowArray = [NSArray arrayByOrderingSet:rowSet byKey:rowLabel ascending:YES];
if ([indexPath row] >= [rowArray count]) {
return UITableViewCellEditingStyleInsert;
}
return UITableViewCellEditingStyleDelete;
}
return UITableViewCellEditingStyleNone;