1

i'm going crazy on this problem: I'm using AQGridView for show some image from an array that i retrieve from SQLite but i'm not able to filter the Grid with a UISearchBar that i put in the TitleView of a Detail zone in a SplitViewController. Can u help me with some logic passage or with an example?

Thanks!

Firegab
  • 313
  • 1
  • 9
  • If you've found the answer to your own question, it's better to post it as the "answer" so to be clear and you'll also get a badge for answering your own question. – Mahm00d Apr 21 '12 at 07:33

1 Answers1

0

SOLVED!

Recalculated the array _icons after removed all objects..

    [_icons removeAllObjects];

    searching = YES;


    NSInteger numeroElem = [subcatList getSize];


    for ( NSUInteger i = 0; i < numeroElem; i++ )
    {

    NSDictionary *itemAtIndex = (NSDictionary *)[subcatList objectAtIndex:i];
    NSString *titolo_cat = [itemAtIndex objectForKey:@"titolo"];

    NSComparisonResult result = [titolo_cat compare:searchText options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch) range:NSMakeRange(0, [searchText length])];
    if (result == NSOrderedSame)
    {
     ETC ETC.......
     [_icons addObject: image];
    }

    };
Firegab
  • 313
  • 1
  • 9