我有一个小问题。在我的主视图控制器上,我有一个条形按钮,可以打开一个幻灯片菜单,这是一个使用幻灯片转换的常规视图控制器。滑动菜单有一个按钮可以打开另一个视图控制器。当新的视图控制器打开时,您可以选择取消,这会关闭当前的视图控制器。问题是,用户再次进入菜单视图,而不是主视图控制器。很高兴知道我做错了什么:)
func openSupport() {
guard let creditViewContoller = storyboard?.instantiateViewController(withIdentifier: "support") as? CreditViewController else { return }
present(creditViewContoller, animated: true)
}
@IBAction func buttonSupport(_ sender: UIButton) {
let menuView = MenuViewController()
menuView.dismiss(animated: true, completion: nil)
openSupport()
print("Tap on Support")
}