These classes aim to copy the behaviour found in iOS built-in Spotlight search, where the search results are grouped by category and the icon of the respective category floats on the left side of the search results.
Check out the example project so see how to setup the classes.
- Add the
.m
+.h
files ofBBFloatingHeaderViewController
andBBFloatingHeaderCell
to your project. - Create a TableView and set the Class of the ViewController to your subclass of
BBFloatingHeaderViewController
- Create the header cell in IB and set its class to your subclass of
BBFloatingHeaderCell
- Make sure that your floating header view is the topmost view in the
BBFloatingHeaderCell
's view hierarchy.
If you find this component useful you can "give me some ❤" on this StackOverflow post / answer