gpt4 book ai didi

ios - +[CATransaction synchronize] 搜索时在事务内调用

转载 作者:可可西里 更新时间:2023-11-01 04:44:56 25 4
gpt4 key购买 nike

我实现了一个 searchController 并添加到 navigationItem 中。

这是代码:

var searchController = UISearchController(searchResultsController: nil)
searchController.obscuresBackgroundDuringPresentation = false

definesPresentationContext = true
searchController.searchResultsUpdater = self
searchController.searchBar.placeholder = NSLocalizedString("Search", comment: "")
searchController.hidesNavigationBarDuringPresentation = true

// Layout
searchController.searchBar.barTintColor = UIColor.groupTableViewBackground
navigationItem.searchController = searchController

当我点击 searchBar 写东西时,这个警告出现在控制台中:

NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction

请问有人知道怎么解决吗?

提前致谢!

最佳答案

存在一个相关的post .

这篇文章指出,这种行为可能是 iOS 端的错误,因为它也发生在仅包含一个 UIViewController 的最小示例中,该 UIViewController 包含一个 UISearchController 并嵌入到一个 UINavigationController 中(参见 Upholder Of Truth 的评论)。

关于ios - +[CATransaction synchronize] 搜索时在事务内调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50161087/

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