| 1186 | } |
| 1187 | |
| 1188 | void 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 | |
| 1214 | void CAScrollView::startPullToHeaderRefreshView() |
| 1215 | { |
no test coverage detected