I have a TableView that displays a list of posts. I would like to add a button that floats over the TableView and the button doesn't move as the user scrolling through the posts. The button will enable a user to post. How can I implement this? I can't seem to add a superview to my tableview.
Google Plus app does something similar, but if you don't have the app, the official website also presents this behavior. The button is located on the bottom left.
Thanks!
There are a couple ways to handle this without needing to lose the table view controller.
If you are using a storyboard, setup a view controller with the button and a container view. In that container view, have the table view controller. You can use delegation, notifications, or key value observing to keep the two view controller in sync.
If you just want the button to simply float over the table view, then you can add the button to the window instead of the view. This has to be done at runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With