Search Bar Tutorial - Xcode 4.5.1

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 48

  • @smitshah27
    @smitshah27 10 ปีที่แล้ว

    absolutely fantastic .... done in a simple way .... thanks

  • @ChristopherAWren
    @ChristopherAWren 12 ปีที่แล้ว

    Great tutorial man. I really appreciate the help in understanding some iOS concepts.

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

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

  • @Ascentyon
    @Ascentyon 11 ปีที่แล้ว

    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.

  • @Ascentyon
    @Ascentyon 11 ปีที่แล้ว

    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.

  • @angeliicaibarra1745
    @angeliicaibarra1745 11 ปีที่แล้ว

    thanks for that example! that worked perfectly

  • @xCodeSoul
    @xCodeSoul 12 ปีที่แล้ว

    i love you, man
    thank you very much very very helpful with my app
    waiting the next one
    see yaa

  • @xemega
    @xemega 12 ปีที่แล้ว

    Thanks for your tutorial.....very good!

  • @daanveldhuis4794
    @daanveldhuis4794 11 ปีที่แล้ว

    Thank you very much, great video!

  • @jaytrixz
    @jaytrixz 12 ปีที่แล้ว

    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.

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    Thanks for suggestion and comment :)

  • @Ascentyon
    @Ascentyon 11 ปีที่แล้ว

    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.

  • @karumanchiparimala5741
    @karumanchiparimala5741 10 ปีที่แล้ว

    Very Cool and Nice tutorial

  • @Lloydandr
    @Lloydandr 12 ปีที่แล้ว

    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

  • @최재성-s4k
    @최재성-s4k 12 ปีที่แล้ว

    Thank you very much! Iffy. I love you :)

  • @OoGaGajR
    @OoGaGajR 12 ปีที่แล้ว

    super many thanks to you!!! nice tutorial!!!

  • @TheYudenList
    @TheYudenList 11 ปีที่แล้ว

    Thank you very much.
    Question ....
    If I import the data using json
    How can I convert the data to NSMutableArray?

  • @84Magicrich
    @84Magicrich 12 ปีที่แล้ว

    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?

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    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.

  • @yphasukyued
    @yphasukyued 12 ปีที่แล้ว

    Thanks for your tutorial. How can I do search on parse json that populate the tableviewcell?

  • @Happy5oceans
    @Happy5oceans 12 ปีที่แล้ว

    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!

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    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.

  • @ZinkTutorials
    @ZinkTutorials 12 ปีที่แล้ว

    Hi great video, i was wondering how i could link one of the text fields to a view thanks

  • @yphasukyued
    @yphasukyued 12 ปีที่แล้ว

    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.

  • @fotisemery5720
    @fotisemery5720 11 ปีที่แล้ว

    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

  • @mohananukala9479
    @mohananukala9479 10 ปีที่แล้ว +1

    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

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    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

  • @yphasukyued
    @yphasukyued 12 ปีที่แล้ว

    Sawasdee krub, how can I do the search with detailLabel(subtitle) . Thanks, Yut

  • @BF3fan03110
    @BF3fan03110 12 ปีที่แล้ว

    Is it the same for web view?
    to search on the internet!

  • @kristianfilipovski9339
    @kristianfilipovski9339 11 ปีที่แล้ว

    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.

  • @espaach
    @espaach 11 ปีที่แล้ว

    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?

  • @Happy5oceans
    @Happy5oceans 11 ปีที่แล้ว

    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!

  • @georgesidnell2845
    @georgesidnell2845 11 ปีที่แล้ว

    Thanks for the video, but how do connect the One, Two, Three... to a page

  • @MrLox7
    @MrLox7 12 ปีที่แล้ว

    thanks man !!!!!!

  • @kimtipatel7
    @kimtipatel7 10 ปีที่แล้ว

    great!!! thanks

  • @tkdrules29
    @tkdrules29 12 ปีที่แล้ว

    How do i link the cells to modals to new views?

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    Thanks!! :)

  • @balestrapatrick
    @balestrapatrick 12 ปีที่แล้ว

    Keep this up! :)

  • @Aussteiger-nw5sn
    @Aussteiger-nw5sn 10 ปีที่แล้ว

    biiiiiig thank you :)

  • @Happy5oceans
    @Happy5oceans 12 ปีที่แล้ว

    sure i will. so do you, right?

  • @allpnay
    @allpnay 12 ปีที่แล้ว

    good tutorial. but you need make some chnges:
    In function searcBarSearchButtonClicked you need self.searchBar resinginfirstresponder;
    this work .
    thanks !!!!!!!!!!!!!!!!!!!!!!

  • @Investwithfili
    @Investwithfili 11 ปีที่แล้ว

    Yeah it doesn't for some reason. It wont let me drag the search bar or the table view to my view controller.h

  • @DrDara
    @DrDara 12 ปีที่แล้ว

    error in if esle

  • @lesliejtay
    @lesliejtay 12 ปีที่แล้ว

    Why doesn't it work for me? I followed every step perfectly!

  • @espaach
    @espaach 11 ปีที่แล้ว

    right click and drag (ctrl click)

  • @Mrtslover2009
    @Mrtslover2009 12 ปีที่แล้ว

    If you can do please tell me because I do it also

  • @Sh3n
    @Sh3n 12 ปีที่แล้ว

    don't work for me :(

  • @iperson450
    @iperson450 11 ปีที่แล้ว

    This does no work for ios 6.1
    I thought this method did