title: Indexed list for table view shows dot iOS 5+
body: <p>In my application I am displaying contacts in table view with indexed list. I am displaying indexed list as follow:</p>
  
  <pre><code> static NSString *letters = @"abcdefghijklmnopqrstuvwxyz#";
  
  -(void)getAllUserInfoUsingBlock:(lclResultsArray) block
  {
      dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
          NSMutableArray *allUserInfoArray = [[NSMutableArray alloc]init];
          NSLog(@"[letters length]:- %d",[letters length]);
          for (int i = 0; i &lt; [letters length]; i++ ) {
  
              NSMutableDictionary *row = [[NSMutableDictionary alloc] init];
  
              char currentLetter[2] = { toupper([letters characterAtIndex:i]), '\0'};
              NSString *str=[NSString stringWithCString:currentLetter encoding:NSASCIIStringEncoding];
              NSMutableArray *words = nil;
              NSLog(@"Value of i:- %d:: Letter:- %@",i,str);
              if (i&lt;[letters length]) {
                  words = [self getUserInfoByStartingCharOfLastName:str isForEmptyValue:NO];
              }
              else {
                  // Get users where name is empty
                  words = [self getUserInfoByStartingCharOfLastName:@"" isForEmptyValue:YES];
              }
  
              NSLog(@"Count for %@ :- %d",str,words.count);
              [row setValue:str forKey:@"sectionTitle"];
              [row setValue:words forKey:@"sectionRows"];
              [allUserInfoArray addObject:row];
  
          }
          dispatch_async(dispatch_get_main_queue(), ^{
              for (NSDictionary *dict in allUserInfoArray) {
                  NSLog(@"Array count:- %d",[[dict objectForKey:@"sectionRows"]count]);
              }
              block(allUserInfoArray,nil);
          });
      });
  }
  
  - (NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section 
  {
      if (aTableView != self.searchDisplayController.searchResultsTableView){
          NSMutableDictionary *sections=[self.contactsArray objectAtIndex:section];
          NSString * sectionTitle= [sections objectForKey:@"sectionTitle"];
          return sectionTitle;
      }
      return nil;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index 
  {
      if (tableView != self.searchDisplayController.searchResultsTableView){
          NSMutableDictionary *sections=[self.contactsArray objectAtIndex:index];
          NSString * sectionTitle= [sections objectForKey:@"sectionTitle"];
          return [self.indices indexOfObject:sectionTitle];
      }
      return 0;
  }
  
  - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
  
      if (tableView != self.searchDisplayController.searchResultsTableView){
          return [self.contactsArray valueForKey:@"sectionTitle"];
      }
      return nil;
  }
  </code></pre>
  
  <p>But it displays as shown in following images</p>
  
  <p><img src="https://i.stack.imgur.com/amgjV.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/YoB62.png" alt="enter image description here"></p>
  
  <p>As you can see in first image its displaying A.C.E .... V.X.Z# Its displaying alternate dots(.) after every character.But as shown in second image its dispalying correct headet title for table from ABC....XYZ#</p>
  
  <p>Whats wrong in my implementation ?</p>