We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看你的demo,都是重写了uitableViewController,能否直接使用XHRefreshControl。 我试了一下,有很多问题,不知道我的方法对不对: UITableView *tableView = [[UITableView alloc]initWithFrame:self.view.bounds]; tableView.delegate = self; tableView.dataSource = self; [self.view addSubview:tableView];
_customRefresh = [[XHRefreshControl alloc]initWithScrollView:tableView delegate:self]; _customRefresh.circleColor = Navigation_Title_Color; _customRefresh.circleLineWidth = 1;
实现delegate: -(void)beginPullDownRefreshing{ NSLog(@"刷新数据"); [self performSelector:@selector(endRefreshing) withObject:nil afterDelay:5]; }
-(void)beginLoadMoreRefreshing{ NSLog(@"加载更多"); }
-(XHRefreshViewLayerType)refreshViewLayerType{ return XHRefreshViewLayerTypeOnScrollViews; }
-(XHPullDownRefreshViewType)pullDownRefreshViewType{ return XHPullDownRefreshViewTypeCircle; }
这样使用是否正确呢?
The text was updated successfully, but these errors were encountered:
你好! 只需要初始化,然后实现你需要的Delegate就可以了
Sorry, something went wrong.
我准备写一个分类来处理这个问题,以后可能就比较方便了
No branches or pull requests
看你的demo,都是重写了uitableViewController,能否直接使用XHRefreshControl。
我试了一下,有很多问题,不知道我的方法对不对:
UITableView *tableView = [[UITableView alloc]initWithFrame:self.view.bounds];
tableView.delegate = self;
tableView.dataSource = self;
[self.view addSubview:tableView];
实现delegate:
-(void)beginPullDownRefreshing{
NSLog(@"刷新数据");
[self performSelector:@selector(endRefreshing) withObject:nil afterDelay:5];
}
-(void)beginLoadMoreRefreshing{
NSLog(@"加载更多");
}
-(XHRefreshViewLayerType)refreshViewLayerType{
return XHRefreshViewLayerTypeOnScrollViews;
}
-(XHPullDownRefreshViewType)pullDownRefreshViewType{
return XHPullDownRefreshViewTypeCircle;
}
[self.customRefresh endPullDownRefreshing];
}
这样使用是否正确呢?
The text was updated successfully, but these errors were encountered: