I saw iOS floating button over table view regarding how to create a floating button. This is the way I create the button. The problem is that the button will scroll with the table view.
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self
action:@selector(aMethod:)
forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Show View" forState:UIControlStateNormal];
button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0);
[view addSubview:button];
How can I fix that?
I suggest you use https://github.com/gizmoboy7/VCFloatingActionButton this link....hope it will work for you