scrollViewDidScroll scrollViewWillEndDragging在主线程上同时运行?

时间:2016-11-14 05:52:26

标签: ios objective-c uiscrollview

我对CREATE OR REPLACE PROCEDURE COM_LOCATION_TXM IS BEGIN DECLARE CURSOR TXM_COM_LOCATION IS SELECT col1,col2,col3 from TBL_SAR_SALAS_1 A; CURSOR TX_COM_LOCATION is select col1,col2,col3 from TBL_LOCALES B; TMP_TXM TXM_COM_LOCATION%ROWTYPE; TMP_TXM TX_COM_COCATION%ROWTYPE; Begin IF NOT TXM_COM_LOCATION%ISOPEN THEN OPEN TXM_COM_LOCATION; END IF; FETCH TXM_COM_LOCATION INTO TMP_TXM; EXIT WHEN TXM_COM_LOCATION%NOTFOUND; IF NOT TX_COM_LOCATION%ISOPEN THEN OPEN TXCOM_LOCATION; END IF; LOOP FETCH TX_COM_LOCATION INTO TMP_TX; EXIT WHEN TX_COM_LOCATION%NOTFOUND; BEGIN Insert statement() END; END LOOP; END LOOP; commit; END; END COM_LOCATION_TXM ; scrollViewDidScroll感到困惑。他们以同步方式工作吗?

我发现,scrollViewWillEndDraggingscrollViewDidScroll 已触发未完成

scrollViewDidScroll stackTrack scrollViewWillEndDragging stackTrack

我的代码

ps: NO BLOCK

修改

我将在scrollViewWillEndDragging中使用属性,它将在scrollViewDidScroll结束时更新。我的问题是scrollViewWillEndDraggingscrollViewDidScroll是否以异步方式运行。如果是这样,我需要使用锁来防止它。

1 个答案:

答案 0 :(得分:0)

  

scrollViewWillEndDragging

当用户完成在UIScrollViewDelegate内滚动内容时,系统会调用此UIScrollView方法。

  

scrollViewDidScroll

当用户在UIScrollViewDelegate内滚动内容时,系统会调用此UIScrollView方法。