ios experience

If you’d like to call local property: [self.treeItems indexOfObject: cell.treeItem]

 

 

UITableView

  1. reloadData                           tmpTreeItem.alreadyExtend=!tmpTreeItem.alreadyExtend;

    self.treeItems = [self listItemsAtPath:@”/”];

    [_treeTableView reloadData];

  2. InsertRows/DeleteRowsAtIndexPaths

 

// NSInteger insertTreeItemIndex = [self.treeItems indexOfObject:cell.treeItem];

// NSMutableArray *insertIndexPaths = [NSMutableArray array];

// NSMutableArray *insertItems = [self listItemsAtPath:[cell.treeItem.path stringByAppendingPathComponent:cell.treeItem.base]];

//

// NSMutableArray *removeIndexPaths = [NSMutableArray array];

// NSMutableArray *treeItemsToRemove = [NSMutableArray array];

// for (CVBaseMenuTreeItem *tmpTreeItem in insertItems) {

// [tmpTreeItem setPath:[cell.treeItem.path stringByAppendingPathComponent:cell.treeItem.base]];

// [tmpTreeItem setParentItem:cell.treeItem];

//

// [cell.treeItem.descendantItems removeAllObjects];

// [cell.treeItem.descendantItems addObjectsFromArray:insertItems];

//

// insertTreeItemIndex++;

//

// BOOL contains = NO; //YES

//

// for (CVBaseMenuTreeItem *tmp2TreeItem in self.treeItems) {      //self.treeItems

// if ([tmp2TreeItem isEqualToSelectingItem:tmpTreeItem]) {

// contains = YES;     //NO

//

// [self selectingItemsToDelete:tmp2TreeItem saveToArray:treeItemsToRemove];

//

// removeIndexPaths = [self removeIndexPathForTreeItems:(NSMutableArray *)treeItemsToRemove];

// }

// }

//

// for (CVBaseMenuTreeItem *tmp2TreeItem in treeItemsToRemove) {

// [self.treeItems removeObject:tmp2TreeItem];

//

// for (CVBaseMenuTreeItem *tmp3TreeItem in self.selectedTreeItems) {

// if ([tmp3TreeItem isEqualToSelectingItem:tmp2TreeItem]) {

// NSLog(@”%@”, tmp3TreeItem.base);

// [self.selectedTreeItems removeObject:tmp2TreeItem];

// break;

// }

// }

// }

//

// if (!contains) {

// [tmpTreeItem setSubmersionLevel:tmpTreeItem.submersionLevel];

//

// [self.treeItems insertObject:tmpTreeItem atIndex:insertTreeItemIndex];

//

// NSIndexPath *indexPth = [NSIndexPath indexPathForRow:insertTreeItemIndex inSection:0];

// [insertIndexPaths addObject:indexPth];

// }

// }

//

// if ([insertIndexPaths count])

// [_treeTableView insertRowsAtIndexPaths:insertIndexPaths withRowAnimation:UITableViewRowAnimationBottom];

//

// if ([removeIndexPaths count])

// [_treeTableView deleteRowsAtIndexPaths:removeIndexPaths withRowAnimation:UITableViewRowAnimationBottom];

//

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s