Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

UISearchBar as Header View #146

Open
dirkvdb opened this Issue · 3 comments

2 participants

@dirkvdb

Hi,

I would like to add a UISearchBar as the GridView Header view which is not visible by default, only when the user scrolls the grid view down. I added the UISearchBar as Header view of the grid view and then call

self.gridView.contentOffset = CGPointMake(0, searchBar.frame.size.height);

in my ViewDidLoad, but somehow the offset is overridden by the grid view to be 0 again by the time it is on the screen.

What would be the best way to get a UISearchbar that behaves like one in TableView with UISearchDisplaycontroller?

Thanks

@kolinkrewinkel
@dirkvdb

That does work but it is pretty ugly. It first shows the search bar and then you see it disappear, even with an animation it is kind of disturbing.

For my iPhone Interface I use a regular table view and there I can set the offset in the ViewDidLoad, is it possible to get the same behavior with the KKGridView?

@kolinkrewinkel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.