File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ open class NormalFooterAnimator: UIView, CRRefreshProtocol {
8888
8989 open func refresh( view: CRRefreshComponent , stateDidChange state: CRRefreshState ) {
9090 switch state {
91+ case . idle:
92+ titleLabel. text = loadingMoreDescription
9193 case . refreshing :
9294 titleLabel. text = loadingDescription
9395 break
Original file line number Diff line number Diff line change @@ -66,10 +66,16 @@ open class CRRefreshHeaderView: CRRefreshComponent {
6666 insets. top += animator. execute
6767 insetTDelta = - animator. execute
6868 holdInsetTDelta = - ( animator. execute - animator. hold)
69- UIView . animate ( withDuration: CRRefreshComponent . animationDuration, animations: {
69+ var point = scrollView. contentOffset;
70+ point. y = - insets. top
71+ UIView . animate ( withDuration: CRRefreshComponent . animationDuration, animations: {
72+
7073 scrollView. contentOffset. y = self . previousOffsetY
7174 scrollView. contentInset = insets
72- scrollView. contentOffset. y = - insets. top
75+ // scrollView.contentOffset.y = -insets.top
76+ scrollView. setContentOffset ( point, animated: false ) ;
77+
78+
7379 } ) { ( finished) in
7480 DispatchQueue . main. async {
7581 self . handler ? ( )
Original file line number Diff line number Diff line change @@ -78,10 +78,13 @@ class RefreshController: BaseViewController {
7878 print ( " 开始加载 " )
7979 DispatchQueue . main. asyncAfter ( deadline: . now( ) + 2 , execute: {
8080 self ? . count += 10
81- self ? . tableView. cr. noticeNoMoreData ( )
81+ self ? . tableView. cr. endLoadingMore ( )
8282 self ? . tableView. reloadData ( )
8383 } )
8484 }
85+
86+ tableView. isPagingEnabled = true
87+
8588 }
8689
8790 //MARK: Override
You can’t perform that action at this time.
0 commit comments