Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add floating button on top of the UITableView?

I need to add floating button on top of UITableViewController.

The following link is used for adding FloatingButton action on top of UIViewController

Creating a floating menu in an iOS application

I already tried to add this floating button to my UITableViewController but it is not visible.

please help me thank you inadvance

like image 530
WeCan Avatar asked May 06 '16 13:05

WeCan


1 Answers

  1. First add the UITableView and then the Button. So it should be like this in the XIB Structure (Button is after the Table not before otherwise it will be hidden):

XIB Structure

  1. Set the Button Constraints related to the Super View and not related to UITableView.

Button Constraints

See that button constraints are related to superview. This is important if you want the Floating Button.

If everything is done correctly it would show like this: enter image description here

like image 175
Ghulam Ali Avatar answered Nov 13 '22 11:11

Ghulam Ali