Hi, I'm looking for a way to search my detailviews, so when the user starts typing inside the bar, he can then select the row and push it's particular detail view.
i finished my app'interface with nav controller tableview and as a second view i add detail view but i am confused about how should i store my datas i got around 5.000 words and their detail views should i use p.list ? . honestly i dont i have any idea about sqlite to use store datas.. i already learn manage datas with Coredata but and i dont have any idea how sould i save my words and their meanings which will view at detailview ??
i finished my app'interface with nav controller tableview and as a second view i add detail view but i am confused about how should i store my datas i got around 5.000 words and their detail views should i use p.list ? . honestly i dont i have any idea about sqlite to use store datas.. i already learn manage datas with Coredata but and i dont have any idea how sould i save my words and their meanings which will view at detailview ??
where should i start pls give me some tips.
Hi Frenzy, I think the answer to both our questions is Core Data, you said that you've already learn to manage data but have no idea to save words. I've read and watch some documentation about Core Data and I'm sure you can do that too. As far I know, you don't need to know sqlite using Core Data and that's because it generate it for you. (it's using SQL to store your data already for you). I'm learning more about it as I type, so I'll keep you posted. Another way I've save words and push them is using plist (the plist is in your resources, therefor saves all your words) by adding a number string (integer) and then using a switch statement to call those rows in the controller. That works fine with me, the only problem is that if you want to insert a Search for those words, you can search the text but you won't be able to push the detail view because it's always row 1.
Thanks Dany, I've used Google. I can find millions of tutorials like you said but they all tell you how to search text (which is the only thing a search bar does), but can you provide a link that explains you how to push your detailviews after that search bar text result, which is one row only?
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
...
if(counter == 1){
//code that push your view.
}
[myTableView reloadData];
}
starting from the code of the tutorial that i posted, you can use this approach, also i'm not so sure is a good idea to auto-push a view when reach 1 result searching.
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
...
if(counter == 1){
//code that push your view.
}
[myTableView reloadData];
}
starting from the code of the tutorial that i posted, you can use this approach, also i'm not so sure is a good idea to auto-push a view when reach 1 result searching.
Thanks for the code, it is very useful. Specially this part of the code: