How do I get value from an UISearchBar

Discussion in 'iOS Programming' started by guydor, Feb 27, 2010.

  1. guydor macrumors member

    Joined:
    Mar 10, 2009
    #1
    in other UIViewController class?

    Hi,

    I have an UISearchBar in one UIViewController and I want to get its value and to use it in other UIViewController (the second one).

    How do I do that?

    If I use searchBar.text I get an error:

    "Request for member 'text' in something not a structure or union"

    Thanks!
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Double-check the type of your searchBar variable.
     
  3. guydor thread starter macrumors member

    Joined:
    Mar 10, 2009
    #3
    Give me an example please, what should I check?


    Thanks!
     

Share This Page