Sticky bottom bar iOS with scrolling

1k views Asked by At

I was going through this Medium iOS app when I stumbled upon this amazing sticky bottom bar

See bottom bar. After the first content is finished and before the next content starts, the bottom bar starts moving

I tried it with using constraints and setting different priorities and their permutations and combinations but could not figure it out.

I also went through a library which does something like that.

Can someone explain me how to go about making this kind of bottom bar?

1

There are 1 answers

11
Ben Ong On BEST ANSWER

That can be done with the default behaviour of the UITableView Header/Footer depending on where you want the view.

Supply that view with its content to UITableView by it's delegate method viewForHeaderInSection or viewForFooterInSection and make sure your set the height correctly by the delegate methods heightForHeaderInSection and heightForFooterInSection.

That will give you a "bar" that moves in with it's content and out of view after it's related content is scrolled away.