【发布时间】:2018-12-20 04:57:11
【问题描述】:
你能在这里看到吗:https://vimeo.com/279403383
我正在尝试显示密码视图。因为这个应用程序对安全性很敏感。
所以如果应用确实进入了后台,请请求密码。
在这种情况下工作得很好。
但是,具体的情况很奇怪。
func applicationDidEnterBackground(_ application: UIApplication) {
guard let passcodeManageView = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "passcodeManageView") as? PasscodeManageViewController else { return }
passcodeManageView.state = State.loginMode
passcodeManageView.modalPresentationStyle = .overFullScreen
var rootViewController = UIApplication.shared.keyWindow?.rootViewController
while let presentController = rootViewController?.presentedViewController {
rootViewController = presentController
}
rootViewController?.present(passcodeManageView, animated: false, completion: nil)
}
所以,我的问题是
密码视图如何覆盖 MFMessageComposeViewController?
或如何关闭 MFMessageComposeViewController?
最好的方法是什么???
【问题讨论】:
-
要关闭任何(模态)视图控制器,请参阅stackoverflow.com/questions/33520899/…