Called within transaction When UIsearch Bar clicked and keyboard showed

僤鯓⒐⒋嵵緔 提交于 2019-12-19 05:23:50

问题


I did a ViewController where there is a button and UITextfield when I click the button a UITableViewController with a UISearchBar is presented and a list of languages is displayed. My issue is when I run the app the first time I click the button and then click the UISearchBar on my console I have this warning

SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction SearchDebugApp[2237:558457] +[CATransaction synchronize] called within transaction

this message happens only the first time I click on the UISearchBar nothing seems to go wrong with the app so I don't now why this is happening and how should I debug it .

I searched on this message warning I found out that This happens when more than one animation are taking place on main thread but in my app the only animation that is happening is when the keyboard is showed .

You can clone project here


回答1:


It looks like this is happening even on Apple example project: Table Search with UISearchController example

You can download the project and run it, you will see the same 4 [CATransaction synchronize] called within transaction



来源:https://stackoverflow.com/questions/48144576/called-within-transaction-when-uisearch-bar-clicked-and-keyboard-showed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!