【发布时间】:2020-12-05 15:30:14
【问题描述】:
我在我的应用程序中使用 SWRevealViewController。除了一件事,一切都很好。
假设我的 SWRevealViewController 菜单中有 A、B、C 3 个项目。我想使用 swift 以编程方式打开 B 项。
更新:代码
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let sw = storyboard.instantiateViewController(withIdentifier: "Reveal") as! SWRevealViewController
let destinationController = storyboard.instantiateViewController(withIdentifier: "VehicleList") as! VehicleList
let navigationController = UINavigationController(rootViewController: destinationController)
sw.pushFrontViewController(navigationController, animated: true)
【问题讨论】:
-
请添加您尝试过的代码
-
@SylvanDAsh 我在我的问题中添加了代码。
标签: ios swift xcode swrevealviewcontroller