how to implement Action in sectionIndexTitlesForTableView Delegate method.?
Hi friends i want know sectionIndexTitlesForTableView Action is works i have the following code... but i want to call the web services with A/B/C/D.... Z as parameter.. So i need to know how it is? My actual need is the products list in with starting letter As A in default , when click on B then i want to show the Product list with Starting letter as B. And also i want A.to..Z in the Right side for table view fo开发者_开发知识库r select the letter... so i tried this but i dont know how to give the Action so please help me..
selectArray = [[NSMutableArray alloc] initWithObjects:@"A",@"B",@"C",@"D",@"E",nil];
Method is:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
return selectedArray;
}
I solved my Question as shown below
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index
{
if (title) {
[self webCall:title];
[tableData setArray:nil];
[table reloadData];
}
return 1;
}
精彩评论