samedi 27 juin 2015

IOS: keyword search in a list of passages only returns the last match, instead of all matches

i have one passage list and from that i want to find out keyword search from user, passage ID getting over ride in array and because of that only last passage showing the result.

i want search keyword from all passage and show the result .

- (UIViewController*) showContentWithQuery:(NSDictionary*)query
{
ContentViewController * viewController = nil;
if (query)
{

    NSNumber * sectionId = query[@"sectionId"];
    NSNumber * passageId = query[@"passageId"];

    if (sectionId)
    {
        viewController = [[[ContentViewController alloc] initWithSectionId:sectionId] autorelease];

        if (passageId)
        {

            viewController.tempHighlightPassageArray = @[passageId];
        }
    }
}

return viewController;     }

Aucun commentaire:

Enregistrer un commentaire