for (HBPreset *preset in oldPresets.children)
{
- [self.root.children addObject:preset];
+ [self.root insertObject:preset inChildrenAtIndex:self.root.countOfChildren];
}
}
{
for (NSDictionary *child in presetsDict[@"PresetList"])
{
- [self.root.children addObject:[[HBPreset alloc] initWithDictionary:child]];
+ [self.root insertObject:[[HBPreset alloc] initWithDictionary:child] inChildrenAtIndex:self.root.countOfChildren];
}
if (result == HBPresetLoadingResultOKUpgraded)
/**
* Notify a delegate that something changed in the tree.
- * KVO observing a tree looked complicated an expensive, so this is a lightweight
+ * KVO observing a tree looks complicated and expensive, so this is a lightweight
* way to track the changes we need to know.
*/
@protocol HBTreeNodeDelegate <NSObject>