【发布时间】:2020-08-03 06:22:34
【问题描述】:
仅 SWIFTUI
我正在使用UIHostingController,当我从父级关闭rootViewController 时我想处理
MAINVIEW** [家长]
let alertHostingController = UIHostingController(rootView: SettingsView())
alertHostingController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
UIApplication.shared.windows[0].rootViewController?.present(alertHostingController, animated: false)
SETTINGS VIEW** [孩子]
UIApplication.shared.windows[0].rootViewController?.dismiss(animated: true, completion: nil)
我想知道孩子何时在父母中被解雇...
有什么想法吗?
附言。我想用completion参数但是不知道怎么读
【问题讨论】:
标签: swift swiftui dismiss completionhandler