iOS Swift 4 Tutorial Search Bar in TableView #IOSbySheldon

preview_player
Показать описание
Hi iOS Developers!!!

This time, I am talking about the UISearchBar in TableView in Swift 4 in Xcode 9 featuring the design of iOS 11 and iPhone X.

I not only included the details to implement the search bar but also shows you guys few options to place the search, which will give your app users quite different user experience.

I hope you enjoy the video and you can download the whole project here in Github:

Also follow my social account:

To donate to me, please use the following Paypal link:
Рекомендации по теме
Комментарии
Автор

Thank you Sheldon for tutorial . Very well explained

abhilashamansukh
Автор

Thanks a lot. Great tutorial and very well explained.

jordiaguilar
Автор

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

JumpingCow
Автор

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?

musicismylife
Автор

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! :)

jfuentessama
Автор

Hi Sheldon, The video is very helpful! This is the only video that have so much detail. Thank you very much!

jonessmith
Автор

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

MattMontanez
Автор

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?

tapizquent
Автор

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

kh
Автор

if we want to search only that string which start with search text then how to do this.
Thank you for your this tutorial.

aniltodkar
Автор

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.

wheland
Автор

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

Alyasi
Автор

What about those warnings? Aren't you going to have problems because of them?

raghibmusarrat
Автор

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.

CastilloJA
Автор

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",

pimpingsrable
Автор

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

mrj
Автор

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

felixalvarez
Автор

This video is good but the search project is not quite complete. Should be able to automatically search by searchText by changing scope

academician
Автор

Is it possible to link (or segue) the listed items to a new storyboard?

mikelai
Автор

How can I hide the keyboard at the end of the search?

vipera