We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a need.add a Default Row. This realization Code,
(void)searchModelWith:(NSArray<OrganizationModel *> *)models{ [models enumerateObjectsUsingBlock:^(OrganizationModel * _Nonnull model, NSUInteger idx, BOOL * _Nonnull stop) { if ([model.key isEqualToString:[GlobalCurrencyInfo SharedInstance].userInfoModel.departMentId]) { [self.treeViewexpandRowIndex addObject:@(idx)]; [self searchChildrenindex:models datas:self.organizationArr]; {///expandTreeView __block NSArray *marr = self.organizationArr; [[[self.treeViewexpandRowIndex reverseObjectEnumerator] allObjects] enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { OrganizationModel *item = marr[[obj integerValue]]; item.isOpen = YES; [self.treeView expandRowForItem:item]; [self.treeView reloadRowsForItems:@[item] withRowAnimation:RATreeViewRowAnimationNone]; marr = item.children; }]; model.isOpen = NO; [self treeView:self.treeView didSelectRowForItem:model]; } return; } if (model.children.count) { [self searchModelWith:model.children]; }
}]; }
(void)searchChildrenindex:(NSArray *)childerns datas:(NSArray *)datas{
[datas enumerateObjectsUsingBlock:^(OrganizationModel * _Nonnull model, NSUInteger idx, BOOL * _Nonnull stop) { if (model.children == childerns) { [self.treeViewexpandRowIndex addObject: @(idx)]; [self searchChildrenindex:datas datas:self.organizationArr]; } if (model.children.count) { [self searchChildrenindex:childerns datas:model.children]; } }];
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a need.add a Default Row. This realization Code,
(void)searchModelWith:(NSArray<OrganizationModel *> *)models{
[models enumerateObjectsUsingBlock:^(OrganizationModel * _Nonnull model, NSUInteger idx, BOOL * _Nonnull stop) {
if ([model.key isEqualToString:[GlobalCurrencyInfo SharedInstance].userInfoModel.departMentId]) {
[self.treeViewexpandRowIndex addObject:@(idx)];
[self searchChildrenindex:models datas:self.organizationArr];
{///expandTreeView
__block NSArray *marr = self.organizationArr;
[[[self.treeViewexpandRowIndex reverseObjectEnumerator] allObjects] enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
OrganizationModel *item = marr[[obj integerValue]];
item.isOpen = YES;
[self.treeView expandRowForItem:item];
[self.treeView reloadRowsForItems:@[item] withRowAnimation:RATreeViewRowAnimationNone];
marr = item.children;
}];
model.isOpen = NO;
[self treeView:self.treeView didSelectRowForItem:model];
}
return;
}
if (model.children.count) {
[self searchModelWith:model.children];
}
}];
}
(void)searchChildrenindex:(NSArray *)childerns datas:(NSArray *)datas{
[datas enumerateObjectsUsingBlock:^(OrganizationModel * _Nonnull model, NSUInteger idx, BOOL * _Nonnull stop) {
if (model.children == childerns) {
[self.treeViewexpandRowIndex addObject: @(idx)];
[self searchChildrenindex:datas datas:self.organizationArr];
}
if (model.children.count) {
[self searchChildrenindex:childerns datas:model.children];
}
}];
}
The text was updated successfully, but these errors were encountered: