【问题标题】:How to open the menu to start the application with swrevealviewcontroller?如何使用 swrevealviewcontroller 打开菜单启动应用程序?
【发布时间】:2016-03-17 13:32:22
【问题描述】:

我正在使用 swrevealviewcontroller 库,我希望我的应用程序启动汉堡菜单时打开。我一直在看图书馆,但我没有看到它是怎么做到的。

谢谢

【问题讨论】:

  • 可以在viewDidLoad中打开吗?或者这不是你想要的
  • 你试过触发你的按钮吗?

标签: ios swift swrevealviewcontroller


【解决方案1】:

在您的 viewdidload 方法中使用此代码。

 UIApplication.sharedApplication()
        .sendAction(barBtn.action, to: barBtn.target,
            from: self, forEvent: nil)

我们以编程方式触发(或)触发按钮单击,以便您的菜单打开。

这会做任何你想做的事:)

【讨论】:

  • 我放这个有问题。也许我错了。我使用 UIBarButtonItem
  • @jorgemht 等一下
  • @jorgemht 现在试试这个你会得到:)
猜你喜欢
  • 2021-08-22
  • 2017-01-22
  • 2021-04-28
  • 1970-01-01
  • 1970-01-01
  • 2016-02-18
  • 1970-01-01
  • 1970-01-01
  • 2012-11-24
相关资源
最近更新 更多