tags:

views:

21

answers:

0

Hi everyone , i try to create an UISearchBar for my app base on Beginning iPhone 3 Development book (chapter 8) , and i have 2 problem :

1- My Plist file is simple i mean without any <KEY> , and when i add the plist file into project and change the sortednames name to my plist file i have nothing in table !!! i remove the table sections and index but doesn't change anything !! here is the code :

2-if iam going to search the Persian or arabic number , the result is nothing !!!

i remove these codes :

- (NSString *)tableView:(UITableView *)tableView 
titleForHeaderInSection:(NSInteger)section
{
    if ([keys count] == 0)
        return nil;

    NSString *key = [keys objectAtIndex:section];
    if (key == UITableViewIndexSearch)
        return nil;

    return key;
}


- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
    if (isSearching)
        return nil;

    return keys;
}


- (NSInteger)tableView:(UITableView *)tableView 
sectionForSectionIndexTitle:(NSString *)title 
               atIndex:(NSInteger)index
{
    NSString *key = [keys objectAtIndex:index];
    if (key == UITableViewIndexSearch)
    {
        [tableView setContentOffset:CGPointZero animated:NO];
        return NSNotFound;
    }
    else return index;

}