Sawasdee krub. To search with the detailLabel, I would put the information from the detailLabel into an array of NSString* then filter the strings of detailLabel and show the results based on the filtered information. Hope this helps. :)
Nice tutorial, one suggestion I would have is to write / talk a little slower. Especially people new to Xcode will have a difficulty following you. (I've only been doing Xcode for 5 days and I had to stop it every 20 or so seconds to catch up. This is especially important when you're saying function names.
I'd say you need two text fields, one for first name and one for last name then, then do one search for the first name (as shown in the tutorial), copy the result into an NSMutableArray, then do another search for the last name in that array.
Thanks for this tutorial. Helped me a lot! I just want to know how can you search inside a tableview with sections? Can you do a separate video on it? For example, you have a table with sections named i.e. name, address, phone number, email address and inside these sections are the values of people with these datas.
Now I have an interesting question, what would you do to resignFirstResponder if I decide not to search? (Ex: I click the search bar, then decide not to search. I can't click the search button because it's grayed out I don't think I can make a button in the background which does the resignFirstResponder when Touch up Inside (as most tutorials show), because the TableView blocks it out and clicking it would just result in selecting a row.
If I am parsing an XML and then using the data to fill a table view. what is the best way to implement the search bar. Can i add the array from the parser file to your example of total strings?
Hmm. I would put the json data from the tableview into an nsmutablearray. and that will be an array of strings that is populated in the tableview. Then from there, do the filter with another nsmutablearray. Then reload the tableview with the 2nd nsmutablearray which should be your filtered array.
Yes, I would do exactly that. Then that would be the total strings. and create a secondary nsmutable array for the filtered strings similar to the tutorial.
Sawasdee Krub, Sorry for not made it cleared for last question. I would like to search on title only and show the search results with title and subtitle. Can you give me the url of your app on the apple store? Thanks again for your quick respond. I just started on iOS and your tutorials are very helpful.
hey man how will i convert the code you wrote into a dictionary type of app? For example the user would type "one" and you would have a definition appear? Please respond asap
Ohh. I see. I would create a separate class. Call this class CustomClass *customClass. This custom class would have two properties (both properties are NSString, call it item1, and item2. Then in your item1, you can keep track of your title, in your item2, you can keep track of your subtitle. So instead of having two arrays to hold your title, and subtitle, you will have only one array of CustomClass to hold both your title and subtitle. So when you filter the title, you can show its subtitle
Okay please I cannot drag my search bar or my table view to the viewcontroller.h. I have no idea how to, it just won't let me. Could you please help me out because I'm working on my new app that needs a search bar but I can't do it. Please help.
for some reason when i write [self.tableView reloadData] it doesn't recognise the reloadData method, nor does it recognise the addObject method in [filteredTopics addObject:str] does anybody know why this could be? maybe a missed @interface declaration?
good tutorial. but you need make some chnges: In function searcBarSearchButtonClicked you need self.searchBar resinginfirstresponder; this work . thanks !!!!!!!!!!!!!!!!!!!!!!
absolutely fantastic .... done in a simple way .... thanks
Great tutorial man. I really appreciate the help in understanding some iOS concepts.
Sawasdee krub. To search with the detailLabel, I would put the information from the detailLabel into an array of NSString* then filter the strings of detailLabel and show the results based on the filtered information.
Hope this helps.
:)
Nice tutorial, one suggestion I would have is to write / talk a little slower. Especially people new to Xcode will have a difficulty following you. (I've only been doing Xcode for 5 days and I had to stop it every 20 or so seconds to catch up. This is especially important when you're saying function names.
I'd say you need two text fields, one for first name and one for last name then, then do one search for the first name (as shown in the tutorial), copy the result into an NSMutableArray, then do another search for the last name in that array.
thanks for that example! that worked perfectly
i love you, man
thank you very much very very helpful with my app
waiting the next one
see yaa
Thanks for your tutorial.....very good!
Thank you very much, great video!
Thanks for this tutorial. Helped me a lot! I just want to know how can you search inside a tableview with sections? Can you do a separate video on it? For example, you have a table with sections named i.e. name, address, phone number, email address and inside these sections are the values of people with these datas.
Thanks for suggestion and comment :)
Now I have an interesting question, what would you do to resignFirstResponder if I decide not to search? (Ex: I click the search bar, then decide not to search. I can't click the search button because it's grayed out I don't think I can make a button in the background which does the resignFirstResponder when Touch up Inside (as most tutorials show), because the TableView blocks it out and clicking it would just result in selecting a row.
Very Cool and Nice tutorial
Very good tutorial! but one question:
I want it so when i tap one of the sections in the tableview i go to another view/screen?
thanku
Thank you very much! Iffy. I love you :)
super many thanks to you!!! nice tutorial!!!
Thank you very much.
Question ....
If I import the data using json
How can I convert the data to NSMutableArray?
If I am parsing an XML and then using the data to fill a table view. what is the best way to implement the search bar. Can i add the array from the parser file to your example of total strings?
Hmm. I would put the json data from the tableview into an nsmutablearray. and that will be an array of strings that is populated in the tableview. Then from there, do the filter with another nsmutablearray. Then reload the tableview with the 2nd nsmutablearray which should be your filtered array.
Thanks for your tutorial. How can I do search on parse json that populate the tableviewcell?
Can you tell me how to make a search bar that generates search result linking to DetailView? I'm trying to make A dictionary type app. Thank you!
Yes, I would do exactly that. Then that would be the total strings. and create a secondary nsmutable array for the filtered strings similar to the tutorial.
Hi great video, i was wondering how i could link one of the text fields to a view thanks
Sawasdee Krub, Sorry for not made it cleared for last question. I would like to search on title only and show the search results with title and subtitle. Can you give me the url of your app on the apple store? Thanks again for your quick respond. I just started on iOS and your tutorials are very helpful.
hey man how will i convert the code you wrote into a dictionary type of app? For example the user would type "one" and you would have a definition appear? Please respond asap
Hi, I like your tutorials but its kinda hard to type all the code. So can u put the source code in the description on your next tutorial?
Thanks
Ohh. I see. I would create a separate class. Call this class CustomClass *customClass. This custom class would have two properties (both properties are NSString, call it item1, and item2. Then in your item1, you can keep track of your title, in your item2, you can keep track of your subtitle. So instead of having two arrays to hold your title, and subtitle, you will have only one array of CustomClass to hold both your title and subtitle. So when you filter the title, you can show its subtitle
Sawasdee krub, how can I do the search with detailLabel(subtitle) . Thanks, Yut
Is it the same for web view?
to search on the internet!
Okay please I cannot drag my search bar or my table view to the viewcontroller.h. I have no idea how to, it just won't let me. Could you please help me out because I'm working on my new app that needs a search bar but I can't do it. Please help.
for some reason when i write [self.tableView reloadData] it doesn't recognise the reloadData method, nor does it recognise the addObject method in [filteredTopics addObject:str]
does anybody know why this could be? maybe a missed @interface declaration?
Can you share your codes, please? I'm trying to do exactly the same that you're doing but I can't make it work. Please help!
Thanks for the video, but how do connect the One, Two, Three... to a page
thanks man !!!!!!
great!!! thanks
How do i link the cells to modals to new views?
Thanks!! :)
Keep this up! :)
biiiiiig thank you :)
sure i will. so do you, right?
good tutorial. but you need make some chnges:
In function searcBarSearchButtonClicked you need self.searchBar resinginfirstresponder;
this work .
thanks !!!!!!!!!!!!!!!!!!!!!!
Yeah it doesn't for some reason. It wont let me drag the search bar or the table view to my view controller.h
error in if esle
Why doesn't it work for me? I followed every step perfectly!
right click and drag (ctrl click)
If you can do please tell me because I do it also
don't work for me :(
This does no work for ios 6.1
I thought this method did