Problem searching a NSMutableArray

Posted on Stack Overflow See other posts from Stack Overflow
Published on 2009-03-09T15:15:23Z Indexed on 2010/03/31 18:03 UTC
Read the original article Hit count: 336

Filed under:
|
|
|

Basically, I have a UISearchBar searching an NSMutableArray of stories that make up an RSS feed, and when you select a story, it loads in my app's UIWebView. It's difficult to explain, but I have a list of entries 1, 2, 3, and 4 and you search for '4'. 4 will be the first entry in the now-filtered list of data, right? You'd think that by selecting 4, it would load in the UIWebView. Well, the app seems to not recognize that you're selecting the first entry in a filtered list of data, and instead thinks that you're selecting the first entry in the unfiltered array of data, so it loads entry 1. Everything looks right in my code, but obviously it isn't.

I know it's a confusing problem, but I hope I made it somewhat clear. Anyway, here's the relevant source so that you may see exactly what I mean:

Search.h: http://www.scribd.com/doc/13107802/Searchh

Search.m: http://www.scribd.com/doc/13107812/Searchm

© Stack Overflow or respective owner

Related posts about iphone

Related posts about search