检查工具栏的按钮时,可以更新ios8.0 object-c的tableview

时间:2016-07-12 09:38:14

标签: objective-c

-(IBAction)ChickMark1Seach:(id)sender{

    NSArray *selectedRows=[self.tableView indexPathsForSelectedRows];
    for (NSIndexPath *indexPath in selectedRows){
    NSDictionary *titleAndIndex = [searchResults objectAtIndex:indexPath.row];
    int p = 1+[[titleAndIndex objectForKey:@"index"] intValue];
     //  NSLog(@"for 101= %ld", (long)p);
        [helper updateAt1:(uint32_t)p];
    }
            checkon = [helper categoriesCK];
    [self.tableView reloadData];
}

1 个答案:

答案 0 :(得分:0)

- (IBAction为)ChickMark1Seach:(ID)发送方{

NSArray *selectedRows=[self.tableView indexPathsForSelectedRows];
for (NSIndexPath *indexPath in selectedRows){
    NSDictionary *titleAndIndex = [searchResults objectAtIndex:indexPath.row];
    int p = 1+[[titleAndIndex objectForKey:@"index"] intValue];
    //  NSLog(@"for 101= %ld", (long)p);

    [helper updateAt1:(uint32_t)p];

}
dispatch_async(dispatch_get_main_queue(), ^{
    self.searchController.active = YES;
});
checkon = [helper categoriesCK];

[self.tableView reloadData];
// 選択されたセルを取得

}