单击浮动按钮(ActionButton)直接转到另一个视图控制器(不生成浮动按钮选项)

Go straight to another view controller (without generating the floating button options)on clicking the floating button(ActionButton)

我正在使用第三方 ActionButton 在我的应用程序中显示浮动按钮。现在,当我单击浮动按钮时,我想直接转到另一个 viewcontroller 即我不想生成通常在单击浮动按钮时显示的选项,我想转到另一个 viewcontroller 直。

再一次,我正在使用第三方 ActionButton。使用过这个第三方的人可能会更快地发现问题...:)

提前致谢....:)

问题可以解决...

我们使用第三方 ActionButton 为任何视图显示一个浮动按钮,就像这样...

actionButton = ActionButton(attachedToView: self.view, items: [])
actionButton.action = { button in
            //the viewcontroller to be shown can be loaded here...     
nil)

此处,在第一行中,items 数组包含单击浮动按钮时要显示的所有选项。但是,如果我们不希望在单击浮动按钮时出现任何选项,可以像我在此处所做的那样将 items 数组留空。

然后在上面的actionButton.action中,我们可以加载所需的视图控制器,正如我在上面指出的那样。

这样做会直接转到我们选择的 viewcontroller,同时单击浮动按钮而不会出现选项...