I am trying to understand how does Facebook Messenger create a button at the button of the screen which stays on top of the UITableView
and follows the scrolling as well?
I want to implement the blue button on the bottom right. What should be my approach to achieve something like that?
Any push in the right direction will be highly appreciated.
There are a few avenues to take when adding the overlay view:
As a subview of the wrapping UINavigationController
, which means it won't scroll with the content of the table
As a section footer of a plain-style UITableView
that has only 1 section
As a subview of the UITableView
and use UIScrollViewDelegate
's scrollViewDidScroll:
to continuously update the view's frame as the user scroll's the table (which makes it appear to stay motionless)