Comments (6)
如果你的item不重用的话,你直接在3,4个添加就行。如果采用的是相同的布局的item,使用了重用。你需要在数据源创建item之后的方法中根据index去设置你的refresh footer
例如:
- (UIScrollView *)swipeTableView:(SwipeTableView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIScrollView *)view {
MyTableView * tableView = view;
// lazy load
if (nil == tableView) {
MyTableView * tableView = [[MyTableView alloc]initWithFrame:swipeView.bounds style:UITableViewStylePlain];
tableView.backgroundColor = [UIColor whiteColor];
// config the tableview
.....
}
[tableView setData:dataArray];
// do something
.....
// your refresh footer
if (index == YourRefreshIndex) {
tableView.refreshFooter = .......;
}else {
tableView.refreshFooter = nil;
}
return tableView;
}
实现的大致逻辑可以参考这个,实际情况根据自己的项目略做调整
from swipetableview.
没有复用,是在创建item时设置footer?
- (ThirdTableView *)thirdTableView
{
if (!_thirdTableView) {
_thirdTableView = [[ThirdTableView alloc] initWithFrame:self.swipeTableView.bounds];
_thirdTableView.footer = [MJRefreshAutoFooter footerWithRefreshingBlock:^{
NSLog(@"上拉加载");
}];
}
return _thirdTableView;
}
- (UIScrollView *)swipeTableView:(SwipeTableView *)swipeView viewForItemAtIndex:(NSInteger)index reusingView:(UIScrollView *)view {
if (index == 0) {
view = self.firstTableView;
[view performSelector:@selector(reloadData)];
} else if (index == 1) {
view = self.secondScrollView;
} else if (index == 2) {
view = self.thirdTableView;
[view performSelector:@selector(reloadData)];
}
return view;
}
from swipetableview.
恩,没有复用的话,在你自己的item中(或者创建你自己的item的时候)设置footer就行。
from swipetableview.
很抱歉,我不是很明白你的问题。你能否把你的这个demo发送到我的邮箱,然后我看一下问题吗?
2016-07-05 11:18 GMT+08:00 CoderJackie [email protected]:
而且只能加载出来一次数据,第二次继续上拉,不会调用block,滚动条也是异常的
[image: simulator screen shot 2016 7 5 11 17 54]
https://cloud.githubusercontent.com/assets/3355958/16573056/2b8f7850-42a2-11e6-9c7f-9a90e726d89f.png—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/APh73KhgYwcsW7D4duIlSXuboG0GzvOEks5qSc0AgaJpZM4JEt-5
.
from swipetableview.
你邮箱或者QQ是多少,我加你
from swipetableview.
[email protected],[email protected]
2016-07-05 13:47 GMT+08:00 CoderJackie [email protected]:
你邮箱或者QQ是多少,我加你
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/APh73KHjTCUrrvM0F9PzrskH9Jg8Tchlks5qSfAGgaJpZM4JEt-5
.
from swipetableview.
Related Issues (20)
- 给继承自STCollectionView 的collectionview 添加MJRefreshHeader 下拉刷新回弹位置错误 HOT 1
- 使用方法还是太不方便了
- alwaysBounceHorizontal 属性没有效果
- 添加mj_header位置问题 HOT 1
- reoloadData无效
- swipeTableViewWillBeginDragging不响应
- Tableview的点击
- Multiple methods named 'frame' found with mismatched result, parameter type or attributes HOT 2
- MJRefresh上拉加载更多 偏移量问题 HOT 2
- 动态修改headview高度的时候显示不正确
- 没有用autolayout的后果
- iOS12 - iPhoneXS 右滑crash HOT 3
- 从别的页面返回更新headerView的高度时布局不对 HOT 1
- 提两点功能补充
- iPhone X适配 和 sectionHeader问题
- iOS 8 crash
- STHeaderView 手势冲突问题
- 如果进入页面,想指定某一个item展示,而不是默认第一个item0,怎么处理?是不是应该暴露一个selectedIndex HOT 1
- attempt to scroll to invalid index path:
- 在维护App的时候,发现了前人集成了这个东西,代码耦合度高的吓人,还很容易触发异步刷新的crash问题,虽然我做了很多修改,源码也做了修改。controller 代码就有5000行,我是心力交瘁啊 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipetableview.