使用SVPullToRefresh 报错 需要注意 以及一些刷新方法

来源:互联网 发布:淘宝小样能买到正品吗 编辑:程序博客网 时间:2024/06/11 20:34

      ___40-[SVPullToRefreshView rotateArrow:hide:]_block_invoke in UIScrollView+SVPullToRefresh.o



需要 导入框架


 QuartzCore framework


ResultType type = [[notifi.objectvalueForKey:dConnectKeyType]intValue];

   switch (type) {

        caseResultType_normal:{

            

           NSDictionary *dic = [[NSDictionaryalloc]init];

            dic = [notifi.objectobjectForKey:@"jsonData"];

            dic = [dicobjectForKey:@"data"];

//            allArray = [dic objectForKey:@"list"];

//            NSLog(@"array = %@",allArray);

           array = [dic objectForKey:@"list"];

           NSLog(@"array = %@",array);

           if (self.isRefreshData ==YES&&[arraycount]>0) {

                [allArrayaddObjectsFromArray:array];

            }else{

               NSLog(@"数据最新");

                [allArrayaddObjectsFromArray:array];

            }

            

           UITableView * statisticsTableView =(UITableView *)[self.viewviewWithTag:dTagETCTableView];

           if (allArray.count >=10) {

               //上拉加载~~~

               UITableView * statisticsTableView =(UITableView *)[self.viewviewWithTag:dTagETCTableView];

               __weak RN_ETCQueryViewController *weakSelf =self;

                

                [statisticsTableViewaddInfiniteScrollingWithActionHandler:^(void){

                   int64_t delayInSeconds = 2.0;

                   dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds *NSEC_PER_SEC);

                   dispatch_after(popTime, dispatch_get_main_queue(), ^(void){

                       self.isRefreshData =NO;

                        [weakSelfloadMoreData];

                       UITableView *dataTableView = (UITableView *)[weakSelf.viewviewWithTag:dTagETCTableView];

                        [dataTableView.infiniteScrollingViewstopAnimating];

                    });

                }];

                

            }

          

            [statisticsTableViewreloadData];

        }

           break;

        caseResultType_connectionError:{

            [SVProgressHUDshowSimpleText:dTips_connectionError];

            

        }

           break;

        caseResultType_noData:{

            [SVProgressHUDshowSimpleText:dTips_noData];

            

        }

           break;

        caseResultType_requestError:{

            [SVProgressHUDshowSimpleText:dTips_requestError];

            

        }

           break;

       default:

           break;

    }







原创粉丝点击