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: 337
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:
© Stack Overflow or respective owner