gpt4 book ai didi

ios - 如何在 Touchid 后更改 View

转载 作者:行者123 更新时间:2023-11-28 05:33:04 25 4
gpt4 key购买 nike

我有 touchID 标识来打开我的应用程序。如果此返回访问正确,请转到其他 View Controller 。但是当我通过身份验证时,一半的屏幕是黑色的,并且还显示了 touchID View 。

我使用:

 let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller3 = storyboard.instantiateViewControllerWithIdentifier("view1") as UIViewController
self.presentViewController(controller3, animated: true, completion: nil)

如何正确地做到这一点?

谢谢!

最佳答案

在没有看到更多您的代码/方法的情况下,很难确定。但是,如果您在 LAContext“evaluatePolicy:localizedReason:reply”的回复 block 中调用任何 UI 代码,则需要将所有 UI 代码放在主线程中。

根据 Apple 文档,方法“异步评估身份验证策略”和回复 block “在未指定的线程上下文中在框架内部的私有(private)队列上进行评估。”

https://developer.apple.com/library/prerelease/ios/documentation/LocalAuthentication/Reference/LAContext_Class/index.html#//apple_ref/occ/instm/LAContext/evaluatePolicy:localizedReason:reply :

关于ios - 如何在 Touchid 后更改 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26802385/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com