Searching? Where do I start?

Discussion in 'iOS Programming' started by ArtOfWarfare, Nov 6, 2011.

  1. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #1
    Okay, so I'd like to add a new feature to emoji typing app... the ability to search for characters.

    I'd like to make a list of keywords the app associates with each character, and if the user is typing a keyword, then it shows the emoji.

    The only issue is... I have no idea how to do this. I've been looking all weekend but haven't found much. I suspect Core Data might be what I'm looking for, but I haven't found any examples that seem to really do what I'm looking for...

    any pointers?

    Do NSPredicates have anything do with what I want?
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    NSPredicate -> Core Data. If you have an array of Emoji characters, you can easily do it, with a Scanner of Characters in your words inside your array.
    If you don't have Core Data within your app, you will need to convert to that, or not. Depends on what you have atm, since I see in your footer that you already have an Emojji app, you just want to edit it right?
     
  3. ArtOfWarfare, Nov 7, 2011
    Last edited: Nov 7, 2011

    ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    Right now I have text files and NSArrays, but I'm trying to figure out Core Data as I'll be needing it for my next app. I figure changing my emoji app over to Core Data will help teach me more about how Core Data works.

    I'm reading up on NSPredicates right now... but I feel like some kind of tutorial that actually demonstrates using both Core Data and NSPredicates together would be most helpful...
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    Art, have u considered the Stanford University C193P version of the Core Data tutorial? :) That might help you out a bit.
     
  5. ArtOfWarfare thread starter macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    I did look at it over a year ago... I didn't pay much attention as I didn't need it at the time... Did they demonstrate using it to search? If they did, I completely forgot about it. I'll check it out this evening when I have a free hour to myself.
     
  6. Sykte macrumors regular

    Joined:
    Aug 26, 2010
    #6
    You could use nspredicate to filter the array and populate a searchcontroller.
     
  7. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    Looks like a good opportunity to create a new object model.
     

Share This Page