-2

In my App, there's a lot of ViewController

I have created floating button in one of theme.

But Is it possible add it to another ViewControllers that I need?

Not whole App, only specific ViewController

Creating Floating Button I referenced

Swift: Floating Plus button over Tableview using The StoryBoard

  • Just don't subclass the `FloatingButtonViewController` then it won't show? – Tj3n Nov 04 '19 at 06:59
  • Give your button a unique tag, like `button.tag = 123321`. and create a method like removeFloatingButton() in which you can remove this button, `[[[self window] viewWithTag: 123321] removeFromSuperview];`. Call this method when you don't need button. You can refer this post: https://stackoverflow.com/q/14997175/5350718 – Hima Nov 04 '19 at 07:02

1 Answers1

1

For Particular View Controller :

Hey You just need to drag button on tableview using xib or storyboard for specific view controller nothing else i have attached below screenshotenter image description here:

For Through out the App :

Or if you want to add floating button through out the app then use this link to implement floating button :

In iOS, how do I create a button that is always on top of all other view controllers?

Dhaval Raval
  • 594
  • 2
  • 7