ios - How to make search results appear in a field under the search bar? -
i'm making ios app search bar in middle of page (google style, it's simple). search bar in case text field.
i'm trying make search results appear right under search bar (google instant style) , give suggestions while user typing. tried using searchresultsdisplaycontroller expects tableview not planning on using.
any ideas?
figured out pretty way!
just make uitableview (set hidden) , put under search bar. then, put logic searching in:
- (void) searchbar:(uisearchbar *)searchbar textdidchange:(nsstring *)searchtext
and make appear! (set hidden property false)
make sure you've implemented protocols uitableviewdelegate
, uitableviewdatasource
, uisearchbardelegate
.
only trouble i'm having can't make stay hidden if type , delete text in search bar. disappears second , comes random values.
Comments
Post a Comment