iOS Swift 4 Tutorial Search Bar in TableView

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 87

  • @abhilashamansukh9807
    @abhilashamansukh9807 4 года назад

    Thank you Sheldon for tutorial . Very well explained

  • @JumpingCow
    @JumpingCow 6 лет назад +6

    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().

    • @vipera7448
      @vipera7448 6 лет назад

      Sorry can u explain me how did you solve the point 2? Bc I have the same problem
      thanks

    • @imyoutubered2018
      @imyoutubered2018 6 лет назад

      when you tap on the screen it will hide the keyboard.

    • @vipera7448
      @vipera7448 6 лет назад

      I'm RUclips Red ok but how to add the gesture?

  • @jordiaguilar658
    @jordiaguilar658 4 года назад

    Thanks a lot. Great tutorial and very well explained.

  • @ahciuL
    @ahciuL 4 года назад

    Worked perfectly. Thanks!

  • @musicismylife5208
    @musicismylife5208 5 лет назад

    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?

  • @jonessmith8670
    @jonessmith8670 6 лет назад

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

  • @MattMontanez
    @MattMontanez 6 лет назад

    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
      @MattMontanez 6 лет назад

      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

    • @MattMontanez
      @MattMontanez 6 лет назад

      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

    • @MattMontanez
      @MattMontanez 6 лет назад

      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!

  • @aniltodkar6199
    @aniltodkar6199 5 лет назад

    Helpful Video. Thank You Sir.

  • @jfuentessama
    @jfuentessama 5 лет назад +1

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

  • @kh5322
    @kh5322 6 лет назад

    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

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      +Herman Kayy you can do that for sure. And it wont block any content of table any more.

    • @gpelican
      @gpelican 6 лет назад

      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.

  • @zihaolin1935
    @zihaolin1935 5 лет назад

    Thanks for teaching! helps a lot

  • @pimpingsrable
    @pimpingsrable 6 лет назад

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

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      May be they changed something in latest xcode. Anyways thanks for the feedback. Keep good work :)

  • @gilsangshin5347
    @gilsangshin5347 6 лет назад

    Fantastic tutorial! Thank you.

  • @quyenanhnguyen9046
    @quyenanhnguyen9046 5 лет назад

    Useful video! Thanks a lot!

  • @orlandosmits6411
    @orlandosmits6411 6 лет назад

    Nice Tutorial, helped me alot!

  • @DewTime
    @DewTime 6 лет назад

    This is really good stuff. Subscribed

  • @CastilloJA89
    @CastilloJA89 5 лет назад

    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.

    • @musicismylife5208
      @musicismylife5208 5 лет назад

      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

  • @felixalvarez3934
    @felixalvarez3934 6 лет назад

    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

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      +Felix Alvarez u can implement the delegate method of table view didSelectRowAtIndexpath to implement the action to go to next page

    • @felixalvarez3934
      @felixalvarez3934 6 лет назад

      Hi, Sheldon.
      I am very grateful, I was watching many but many tutorials, without giving the solution, it works.
      Thank you so much

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      Cool :)

  • @wheland44
    @wheland44 6 лет назад

    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.

  • @aniltodkar6199
    @aniltodkar6199 5 лет назад

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

  • @lawrence4388
    @lawrence4388 6 лет назад

    Thank you It is very very helpful!!

  • @theworldaroundus3705
    @theworldaroundus3705 5 лет назад

    wow great stuff...

  • @mrj9801
    @mrj9801 6 лет назад

    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

  • @norahalrashoudi5766
    @norahalrashoudi5766 6 лет назад

    Thank you for the helpful video!

  • @academician123
    @academician123 5 лет назад

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

  • @gavinwolfe4460
    @gavinwolfe4460 7 лет назад

    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

    • @iOSeTutorials
      @iOSeTutorials  7 лет назад

      +Gavin Wolfe u mean push notification. I can do it definitely. I knew firebase can do it. I haven't use yours

    • @gavinwolfe4460
      @gavinwolfe4460 7 лет назад

      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.

  • @TamFbs
    @TamFbs 5 лет назад

    legend

  • @akshayk7868
    @akshayk7868 5 лет назад

    thank you

  • @raghibmusarrat3610
    @raghibmusarrat3610 6 лет назад

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

  • @lucaguitarplayer
    @lucaguitarplayer 5 лет назад

    Is this working also for Swift 5?

  • @dead2589
    @dead2589 6 лет назад

    Very Very helpfull video thank you alot!

  • @prajvalraval
    @prajvalraval 6 лет назад +10

    12:36

  • @tapizquent
    @tapizquent 5 лет назад

    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?

  • @Alyasi1985
    @Alyasi1985 6 лет назад

    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

  • @jonessmith8670
    @jonessmith8670 6 лет назад

    Hi Sheldon, Would you teach us floating menu ? Thank you!

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      What do u mean by floating menu?

    • @jonessmith8670
      @jonessmith8670 6 лет назад

      Hi Sheldon, like the link:
      ruclips.net/video/Wq2tlBo98rs/видео.html
      Thank you!

  • @thegeeksides
    @thegeeksides 5 лет назад

    thanks buddy.

  • @jonessmith8670
    @jonessmith8670 6 лет назад +1

    Hi Sheldon, Please forget the question that asked. Now I know, answer at the last question reply! Don't waste your time. Thank you!

  • @jonessmith8670
    @jonessmith8670 6 лет назад

    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!

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад +1

      That animal stands for each and every one element in the array, basically you are running a for loop to do the filter.

    • @jonessmith8670
      @jonessmith8670 6 лет назад

      Thank you very my much Sheldon! Thank you for you reply! So, may I use other string to instead animal?

    • @jonessmith8670
      @jonessmith8670 6 лет назад

      Oh!!!!Thank you very much! I am sorry for the trouble! It could be any string! Sorry.....................

  • @nikbelikov
    @nikbelikov 6 лет назад

    Thanks a lot!

  • @mikelai1799
    @mikelai1799 6 лет назад

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

    • @iOSeTutorials
      @iOSeTutorials  6 лет назад

      Yep. U just need to drag and drop a storyboard reference.

  • @vipera7448
    @vipera7448 6 лет назад

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

  • @sbaba
    @sbaba 7 лет назад

    unfortunately here PayPal was closed.
    Is there another way to make a small donation?

    • @iOSeTutorials
      @iOSeTutorials  7 лет назад

      +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.

  • @dimoreno9398
    @dimoreno9398 6 лет назад

    Excelent Thanks :D :D

  • @DrChazz26
    @DrChazz26 7 лет назад

    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?

    • @iOSeTutorials
      @iOSeTutorials  7 лет назад

      +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

    • @DrChazz26
      @DrChazz26 6 лет назад

      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.

  • @LetCreateAnApp
    @LetCreateAnApp 6 лет назад

    Please go to this video also :
    ruclips.net/video/wVeX68Iu43E/видео.html

  • @RM-di6oe
    @RM-di6oe 6 лет назад +1

    its too fast bro .......

  • @loccoexi1577
    @loccoexi1577 5 лет назад

    njirr kaesang

  • @lebum3130
    @lebum3130 7 лет назад

    哪里人啊?

  • @jackrex2998
    @jackrex2998 5 лет назад

    Are you live in China, your english sounds strange!

  • @swiftlandacademy3193
    @swiftlandacademy3193 4 года назад

    Thanks a lot!