Floaty icon indicating copy to clipboard operation
Floaty copied to clipboard

Cant add Floaty button to Window level

Open abubakar-9013 opened this issue 3 years ago • 1 comments

I am using this pod, and when i try to use the code to add floaty button to window level, the button is not showing. I am using the code as shown in example.

Floaty.global.button.addItem(title: "Hello")
Floaty.global.show()

However, at the UIViewController level, the button is showing up. What can be the problem? All I am doing is just creating a new project and after installing pod, inside the ViewController viewDidLoad (Also tried with ViewDidAppear), I am writing these two lines. Any help would be appreciated! The pod version is 4.2.0

abubakar-9013 avatar Apr 23 '21 15:04 abubakar-9013

If the app using the window scene. Then the internal FloatyWindow needs init with init(windowScene:) (it works). But that will cause the button to only display on that window. And the global instance does not make sense due to multiple window scenes.

Maybe needs a window manager to sync the button in all window scenes. I'm not sure is that a use case in that situation.

MainasuK avatar May 24 '21 09:05 MainasuK