iOS Best Way To Build Smart Search

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,224
123
whats the best way to create a smart search,


should i call data from a web service and have it pop up in a list under the search bar? or should i use core data,


but the thing is they have 3.5 million items.......

of course i want it optimized not sure which way to go. but I'm thinking web service,

because i know theres no way the iPhone can reasonably hold all that data,
 

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
Google API is what we use, with every letter you type in, send an API to google, it sends back an JSON and you parse that on the fly on a tableview.. that's how alot of them do it ^_-
 
Comment

loon3y

macrumors 65816
Original poster
Oct 21, 2011
1,224
123
Google API is what we use, with every letter you type in, send an API to google, it sends back an JSON and you parse that on the fly on a tableview.. that's how alot of them do it ^_-
sorry maybe i should of said more detail.



I'm basically using the search bar for my customers database via web service.

and I'm wondering how i can set up the the drop down table view that shows the search the potential search results, something like this:






and i was wondering i would make an if statement in the XML parser correct?



like if there is more than one search result, show the drop down and show the potential results, if not (only one result) show that item.




edit:


but only showing the drop down, when i type something in, I.E.: i type in "battle" in the search bar, and it'll show potential search results like "battleship, battlecruiser, battlement, battle map, etc etc"

but ill be using model names like DC-9096 and such



and also, would this drop down be possible on a UITextField? because where the user types in the model number is UITextfield, I'm wondering if i can still keep that textfield and just add the drop down, or if its just simpler to use the UISearchbar.
 
Last edited:
Comment

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.