Excellent tutorial! Two things to make it better: 1. Point out that he outlet for searchBar cannot be "weak", or the first method to keep the search bar at the top will not work. 2. Need to have a way to dismiss the keyboard when done searching - I added a tap gesture handler which calls searchBar.resignFirstResponder().
Great tutorial, works like a charm also in swift 5.. but I was wondering how to handle this in the DidSelectRowAtIndexPath? To perform a segue with identifier to a whole new ViewController.. coz if I approach it with “if indexpath.row == 0, performsegue, then it’s crashing. Can you help and show some code to handle it?
Thank you. This is by far the best and most thorough tutorial on this. Helped me a lot on what I needed done. Took me 3 days to find this video and it was exactly what I needed
Hey so, everything works beautifully, but I want the cells/table to have a black background and when I try to do ti with the search bar in there it won't work... But with out the search bar it works.. any ideas or help to get he cells/table to be black? self.table.backgroundView = bgImage
I should mention it that when i do search the background turns black when there aren't any results and its blank but if there is a result it has the white background
I figured it out LOL just had to turn on my brain... in cellForRowAt i added cell.backgroundColor = UIColor.clear and it solved the problem lol thanks!
Hi Sheldon! Great video! Do you have anything like implementing a searchbar in a tableview with multiple sections? Impossible to find a good one! Thanks in advance and keep up the good work! :)
Great video! I had a question: For the searchBar to stay on top of the header when you're scrolling, instead of manually setting it in code, couldn't you put the UISearchBar out of the TableView and on top of it in the View Hierarchy? Thanks
How Sheldon, I can't find any sources to show me how to keep the SearchBar from scrolling away when swiping through the cells after the results are display. I want to keep it fixed. If you would do a video on that it would be greatly appreciated.
Neither methods to add the searchBar at the top didn't work for me, I had to change the "estimatedHeaderHeight" to table.sectionHeaderHeight =100 . This lead to me being able to keep the scopeBar visible, this was a very detailed tutorial "Thank You",
Excellent Tutorial, I was wondering if you hace a tutorial in how to turn the table view cells into buttons, and make them trigger a new view controller showing the info from the table plus adicional information.
I’m looking for the same thing. How to handle the filtered search in the didselectrowatindexpath to perform a segue with identifier to a whole new ViewController.. not a detail controller
Hi, Sheldon. The tutorial is very good, very detailed. I'm new to this, and I'm doing a project, which, this part was easy with Android, because with the tool "AutoCompleteTextView", you only need an array and the desired data is filtered, the "onClick" is implemented and now we have the data selected to work on the next view, or wherever you want. In Xcode Swift I did not find this, and the table and the search bar must be implemented, from here I can not make the filtered data go to the second screen, and I can work with it. If you could provide the code to do this, from this tutorial. Thank you so much
Hi, thank you for the tutorial, I have a problem around minutes 7-8 because Xcode tells me that I have no Initializers, but you do not seem to have either so I do not understand. Thank you.
This is the awesome tutorial video But I just wondering how could I do in my case that the UITable inside container view and the search bar is on the segmented view
Hey man your tutorials are great, but I believe you should do a tutorial on sending user to user or device to device notifications. There are hundreds of questions on stack overflow, but NO and I mean 0 tutorials on youtube. That would get a lot of action if you did it with firebase too. I used oneSignal
cool, I know there are plenty of tutorials on firebase push notifications via console, but when creating a chat app, you need to notify the other user you have sent a message or have received one.
If the searchBar is put inside the header, when you call reloadData, the keyboard hides, as it destroys the searchBar and builds it again. Any workaround this?
Hello brother.. I have a problem and I want to help me with it Activate the search bar in my program I thought my program is saving a user and the numbers and other information and I want a search bar looking for numbers I could not Several offices were used, including Realm and Core data SQLite I could not find a way Can you help me to learn it
Hi Sheldon, You tutorial is perfect, I have made a search bar app like the tutorial successfully, but I am not clever enough unfortunately! Would you please point me out at the line 62 & 63, at time slot 13:51, the string "animal" currentAnimalArray = animalArray.filter({ animal -> Bool in animal.name.contains(searchBar.text) As I could not find where the "animal" string come from! I am sorry for the trouble!
I'm having an issue with the data initially loading into the tableView. When the project loads nothing shows until the search bar is clicked, a character is input (the search starts working and displays the appropriate rows for what was input), and then deleted (all rows then display with appropriate data). Any idea why the tableView is empty when the project first loads?
+Kevin C. Smith, Jr. check the logic wether your data is ready when the table is loaded. It is possible that you load your table before the array is ready or you may missing the logic to load the table very first
Thank you so much for your reply. It took me a while to figure out the fix but I finally got it. Because I was combining 2 of your tutorials into 1 I was having trouble with getting what you're calling currentAnimalArray to equal animalArray on launch. Everything is working great, thank you so much for the lesson.
Thank you Sheldon for tutorial . Very well explained
Excellent tutorial!
Two things to make it better:
1. Point out that he outlet for searchBar cannot be "weak", or the first method to keep the search bar at the top will not work.
2. Need to have a way to dismiss the keyboard when done searching - I added a tap gesture handler which calls searchBar.resignFirstResponder().
Sorry can u explain me how did you solve the point 2? Bc I have the same problem
thanks
when you tap on the screen it will hide the keyboard.
I'm RUclips Red ok but how to add the gesture?
Thanks a lot. Great tutorial and very well explained.
Worked perfectly. Thanks!
Great tutorial, works like a charm also in swift 5.. but I was wondering how to handle this in the DidSelectRowAtIndexPath? To perform a segue with identifier to a whole new ViewController.. coz if I approach it with “if indexpath.row == 0, performsegue, then it’s crashing. Can you help and show some code to handle it?
Hi Sheldon, The video is very helpful! This is the only video that have so much detail. Thank you very much!
Thank you. This is by far the best and most thorough tutorial on this. Helped me a lot on what I needed done. Took me 3 days to find this video and it was exactly what I needed
Hey so, everything works beautifully, but I want the cells/table to have a black background and when I try to do ti with the search bar in there it won't work... But with out the search bar it works.. any ideas or help to get he cells/table to be black?
self.table.backgroundView = bgImage
I should mention it that when i do search the background turns black when there aren't any results and its blank but if there is a result it has the white background
I figured it out LOL just had to turn on my brain... in cellForRowAt i added cell.backgroundColor = UIColor.clear and it solved the problem lol thanks!
Helpful Video. Thank You Sir.
Hi Sheldon! Great video! Do you have anything like implementing a searchbar in a tableview with multiple sections? Impossible to find a good one! Thanks in advance and keep up the good work! :)
Omg did u find an answer on how to do it!!!??
Great video! I had a question: For the searchBar to stay on top of the header when you're scrolling, instead of manually setting it in code, couldn't you put the UISearchBar out of the TableView and on top of it in the View Hierarchy? Thanks
+Herman Kayy you can do that for sure. And it wont block any content of table any more.
How Sheldon, I can't find any sources to show me how to keep the SearchBar from scrolling away when swiping through the cells after the results are display. I want to keep it fixed. If you would do a video on that it would be greatly appreciated.
Thanks for teaching! helps a lot
Neither methods to add the searchBar at the top didn't work for me, I had to change the "estimatedHeaderHeight" to table.sectionHeaderHeight =100 . This lead to me being able to keep the scopeBar visible, this was a very detailed tutorial "Thank You",
May be they changed something in latest xcode. Anyways thanks for the feedback. Keep good work :)
Fantastic tutorial! Thank you.
Useful video! Thanks a lot!
Nice Tutorial, helped me alot!
This is really good stuff. Subscribed
Excellent Tutorial, I was wondering if you hace a tutorial in how to turn the table view cells into buttons, and make them trigger a new view controller showing the info from the table plus adicional information.
I’m looking for the same thing. How to handle the filtered search in the didselectrowatindexpath to perform a segue with identifier to a whole new ViewController.. not a detail controller
Hi, Sheldon.
The tutorial is very good, very detailed. I'm new to this, and I'm doing a project, which, this part was easy with Android, because with the tool "AutoCompleteTextView", you only need an array and the desired data is filtered, the "onClick" is implemented and now we have the data selected to work on the next view, or wherever you want. In Xcode Swift I did not find this, and the table and the search bar must be implemented, from here I can not make the filtered data go to the second screen, and I can work with it.
If you could provide the code to do this, from this tutorial.
Thank you so much
+Felix Alvarez u can implement the delegate method of table view didSelectRowAtIndexpath to implement the action to go to next page
Hi, Sheldon.
I am very grateful, I was watching many but many tutorials, without giving the solution, it works.
Thank you so much
Cool :)
Hi, thank you for the tutorial, I have a problem around minutes 7-8 because Xcode tells me that I have no Initializers, but you do not seem to have either so I do not understand. Thank you.
if we want to search only that string which start with search text then how to do this.
Thank you for your this tutorial.
Thank you It is very very helpful!!
wow great stuff...
This is the awesome tutorial video
But I just wondering how could I do in my case that the UITable inside container view and the search bar is on the segmented view
Thank you for the helpful video!
This video is good but the search project is not quite complete. Should be able to automatically search by searchText by changing scope
Hey man your tutorials are great, but I believe you should do a tutorial on sending user to user or device to device notifications. There are hundreds of questions on stack overflow, but NO and I mean 0 tutorials on youtube. That would get a lot of action if you did it with firebase too. I used oneSignal
+Gavin Wolfe u mean push notification. I can do it definitely. I knew firebase can do it. I haven't use yours
cool, I know there are plenty of tutorials on firebase push notifications via console, but when creating a chat app, you need to notify the other user you have sent a message or have received one.
legend
thank you
What about those warnings? Aren't you going to have problems because of them?
Is this working also for Swift 5?
Very Very helpfull video thank you alot!
12:36
If the searchBar is put inside the header, when you call reloadData, the keyboard hides, as it destroys the searchBar and builds it again. Any workaround this?
Hello brother..
I have a problem and I want to help me with it
Activate the search bar in my program
I thought my program is saving a user and the numbers and other information and I want a search bar looking for numbers I could not
Several offices were used, including Realm and Core data
SQLite
I could not find a way
Can you help me to learn it
Hi Sheldon, Would you teach us floating menu ? Thank you!
What do u mean by floating menu?
Hi Sheldon, like the link:
ruclips.net/video/Wq2tlBo98rs/видео.html
Thank you!
thanks buddy.
Hi Sheldon, Please forget the question that asked. Now I know, answer at the last question reply! Don't waste your time. Thank you!
Good to know that u solved it.
Oh! Very kind of you!
Hi Sheldon, You tutorial is perfect, I have made a search bar app like the tutorial successfully, but I am not clever enough unfortunately! Would you please point me out at the line 62 & 63, at time slot 13:51, the string "animal"
currentAnimalArray = animalArray.filter({ animal -> Bool in
animal.name.contains(searchBar.text)
As I could not find where the "animal" string come from! I am sorry for the trouble!
That animal stands for each and every one element in the array, basically you are running a for loop to do the filter.
Thank you very my much Sheldon! Thank you for you reply! So, may I use other string to instead animal?
Oh!!!!Thank you very much! I am sorry for the trouble! It could be any string! Sorry.....................
Thanks a lot!
Is it possible to link (or segue) the listed items to a new storyboard?
Yep. U just need to drag and drop a storyboard reference.
How can I hide the keyboard at the end of the search?
unfortunately here PayPal was closed.
Is there another way to make a small donation?
+Suleyman Baba thanks for even try to donate. I wasnt checking the link cuz I thought nobody would do it... Lol. I will update it.
Excelent Thanks :D :D
I'm having an issue with the data initially loading into the tableView. When the project loads nothing shows until the search bar is clicked, a character is input (the search starts working and displays the appropriate rows for what was input), and then deleted (all rows then display with appropriate data). Any idea why the tableView is empty when the project first loads?
+Kevin C. Smith, Jr. check the logic wether your data is ready when the table is loaded. It is possible that you load your table before the array is ready or you may missing the logic to load the table very first
Thank you so much for your reply. It took me a while to figure out the fix but I finally got it. Because I was combining 2 of your tutorials into 1 I was having trouble with getting what you're calling currentAnimalArray to equal animalArray on launch. Everything is working great, thank you so much for the lesson.
Please go to this video also :
ruclips.net/video/wVeX68Iu43E/видео.html
its too fast bro .......
njirr kaesang
哪里人啊?
+Shao Kahn 你猜
Beijing 的?
+Shao Kahn 山东的啊啊 你哪里的
Beijing的
+Shao Kahn 👍
Are you live in China, your english sounds strange!
Thanks a lot!