UIScrollView scrolling - blocking main thread
I have a strange problem while the UITableView is scrolling. I am unable to trigger any events (press down button, change layout color). The funny thing is that when I touch the UISeachBar, the keyboard appears immediately. I understand that the main thread is blocked, however I am wondering if there are any solutions to fix this issue.
source to share
With a brief description of your problem, I suppose this is because when you loop through the tableView desktop loop variable from NSDefaultRunLoopMode
to NSEventTrackingRunLoopMode
(see Starting Loops )
In order to change its UI while scrolling, the solution seems to be doing your UI updates to NSRunLoopCommonModes
, which includes the two loop modes you were targeting.
Prevent it from scrolling down your table.
source to share