2016-07-12 3 views
0
die Tableview für ios8.0 objekt c erneuern
-(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]; 
} 
+0

welche Array verwendet als Datasource self.tableView? – Igor

Antwort

0

- (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]; 

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

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

}

+0

dispatch_async (dispatch_get_main_queue(),^{ self.searchController.active = YES; }); –

Verwandte Themen