yo have to use this Approach to show different Cell Result
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return _mutableArray.count;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(5, 0, tableView.frame.size.width, heightOfSection)];
NSDictionary *dict = [_mutableArray objectAtIndex:section];
NSString *useIt= [dict objectForKey:@"CategoryName"]
return view;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
NSDictionary *dict = [_mutableArray objectAtIndex:section];
NSArray *array= [dict objectForKey:@"FontNames"];
return array.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableViewLocal cellForRowAtIndexPath:(NSIndexPath *)indexPath{
// static NSString *cellIdentifier = @"Cell";
UITableViewCell *Cell = [tableViewLocal dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
for (__strong UIView *view in Cell.contentView.subviews) {
[view removeFromSuperview];
view = nil;
}
// [tableViewLocal setAllowsSelection:NO];
/* UILabel *labelDetailName =[[UILabel alloc]init];
labelDetailName.frame =CGRectMake(5, 15, 300, 40);
NSDictionary *dict = [_mutableArray objectAtIndex:(tableViewLocal.tag-100)];
NSArray *arrayLocal = [dict objectForKey:@"FontNames"];
NSString *titleName =[ [arrayLocal objectAtIndex:indexPath.item]objectForKey:@"title"];
labelDetailName.text = titleName;
NSString *fontName = [[arrayLocal objectAtIndex:indexPath.item] objectForKey:@"nameForSystem"];
labelDetailName.font = [UIFont fontWithName:fontName size: kSystemVersion < 7.0 ? 20 : 16];
[Cell.contentView addSubview:labelDetailName]; */
NSDictionary *dict = [_mutableArray objectAtIndex:(tableViewLocal.tag-100)];
NSArray *Array = [dict objectForKey:@"FontNames"];
NSString *localString = [Array objectAtIndex:indexPath.row]; // use it
}