Discussion Forums  >  Uncategorized

Replies: 1    Views: 245

basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
01/06/12 02:04 PM (14 years ago)

live search within a page (iOS)

I have an InDesign document that I can export to XML or HTML or PHP, and I need the text within that document to be searchable from within my app. Ideally, I'd have a search bar at the top of the page, and when you enter an item (pork for example), the special offers list below the search bar would scroll elegantly to the first line that mentions pork. Then hitting the next button would take you to the next one, etc. Id like to have a prev button too so you can go back. Does anyone know of a way to implement this without too much work? I would have to do it every month for around 200 items. If I could place an anchor next to the items in an html doc, and then somehow link the search results to the anchors, that might do it...? Alternatively, a live search feature that would only show the lines with pork in would be even better. I would, however, need the full line to be shown (i.e. pork scratchings...£1.99 and not just the word pork). It would be nice if the code could live within the app, and reference an external doc for the data. Any ideas??
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/07/12 12:42 AM (14 years ago)
A few different concepts here, none of them easy but of course anything 'could' be figured out. a) Scrolling a list visibly on the screen down to the search item is totally different than filtering the list and only showing items that match. This is more of an instant thing and no scrolling affect is shown. This is the default iOS search behavior (search contacts app) b) Backend search AND local data search of data in device. Like the first comment, doing both of these at the same time is more of a trick. It would be like downloading data in the background and saving it to the device then searching this data when the user did the search. Technically you'll only search the local data but actually you are working out some sort of background process to inspect the backend data to fetch what you need. I'm not sure how to advise here. It's tough because there are lots of concepts to understand, each of them complex in their own right.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.