MCPcopy Create free account
hub / github.com/9miao/CrossApp / detectionFromPullToRefreshView

Method detectionFromPullToRefreshView

CrossApp/view/CAScrollView.cpp:1188–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1186}
1187
1188void CAScrollView::detectionFromPullToRefreshView()
1189{
1190 if (m_pHeaderRefreshView && m_pHeaderRefreshView->isCanRefresh())
1191 {
1192 this->stopDeaccelerateScroll();
1193 this->setContentOffset(DPoint(0, -128), true);
1194 m_pHeaderRefreshView->setPullToRefreshStateType(CAPullToRefreshView::Refreshing);
1195 if (m_pScrollViewDelegate)
1196 {
1197 m_pScrollViewDelegate->scrollViewHeaderBeginRefreshing(this);
1198 }
1199 }
1200
1201 if (m_pFooterRefreshView && m_pFooterRefreshView->isCanRefresh())
1202 {
1203 this->stopDeaccelerateScroll();
1204 this->setContentOffset(DPoint(0, this->getViewSize().height - this->getBounds().size.height + 128), true);
1205 m_pFooterRefreshView->setPullToRefreshStateType(CAPullToRefreshView::Refreshing);
1206
1207 if (m_pScrollViewDelegate)
1208 {
1209 m_pScrollViewDelegate->scrollViewFooterBeginRefreshing(this);
1210 }
1211 }
1212}
1213
1214void CAScrollView::startPullToHeaderRefreshView()
1215{

Callers 1

ccTouchEndedMethod · 0.95

Calls 7

setContentOffsetMethod · 0.95
DPointClass · 0.85
isCanRefreshMethod · 0.80

Tested by

no test coverage detected