johnil / vvebotableviewdemo Goto Github PK
View Code? Open in Web Editor NEWVVebo剥离的TableView绘制
VVebo剥离的TableView绘制
运行的时候终端会有内存泄漏的打印,在View-VVeboLabel-setText:方法中。
iOS 11上滑动超过8个cell距离,在tableview停止滑动后会出现cell空白的问题。
定位到问题出在-scrollViewWillEndDragging: withVelocity: targetContentOffset:
中
系统给出targetContentOffset
,按照目前的逻辑会只加载滑动停止的目的cell的前或后3个cell,滑动过程中的cell不会渲染,但iOS 11上并没有滑动到指定的cell中途就停止了
log日志如下:
2018-05-08 15:11:44.273980+0800 VVeboTableViewDemo[3063:806070] 滑动终点目标:54,offset.y:6622.000000
2018-05-08 15:11:44.274088+0800 VVeboTableViewDemo[3063:806070] 当前可视目标:13,offset.y:3802.500000
2018-05-08 15:11:44.274177+0800 VVeboTableViewDemo[3063:806070] ------将会渲染第54、55、56列视图外Cell------
2018-05-08 15:11:44.286352+0800 VVeboTableViewDemo[3063:806070] ------将要load第17列Cell------
2018-05-08 15:11:44.286434+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableViewCell clear]
2018-05-08 15:11:44.286726+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.336619+0800 VVeboTableViewDemo[3063:806070] ------将要load第18列Cell------
2018-05-08 15:11:44.336722+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableViewCell clear]
2018-05-08 15:11:44.337161+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.387073+0800 VVeboTableViewDemo[3063:806070] ------将要load第19列Cell------
2018-05-08 15:11:44.387205+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableViewCell clear]
2018-05-08 15:11:44.387836+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.388766+0800 VVeboTableViewDemo[3063:806070] ------将要load第20列Cell------
2018-05-08 15:11:44.388829+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableViewCell clear]
2018-05-08 15:11:44.389313+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.486760+0800 VVeboTableViewDemo[3063:806070] ------将要load第20列Cell------
2018-05-08 15:11:44.487159+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.620111+0800 VVeboTableViewDemo[3063:806070] ------将要load第21列Cell------
2018-05-08 15:11:44.620500+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.720069+0800 VVeboTableViewDemo[3063:806070] ------将要load第22列Cell------
2018-05-08 15:11:44.720482+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:44.886727+0800 VVeboTableViewDemo[3063:806070] ------将要load第23列Cell------
2018-05-08 15:11:44.886858+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableViewCell clear]
2018-05-08 15:11:44.887444+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:45.086542+0800 VVeboTableViewDemo[3063:806070] ------将要load第24列Cell------
2018-05-08 15:11:45.086885+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:45.353420+0800 VVeboTableViewDemo[3063:806070] ------将要load第25列Cell------
2018-05-08 15:11:45.353823+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:46.236671+0800 VVeboTableViewDemo[3063:806070] ------将要load第26列Cell------
2018-05-08 15:11:46.236987+0800 VVeboTableViewDemo[3063:806070] ----当前列不是滑动停止视图列----
2018-05-08 15:11:47.437588+0800 VVeboTableViewDemo[3063:806070] -[VVeboTableView scrollViewDidEndDecelerating:]
2018-05-08 15:11:47.438409+0800 VVeboTableViewDemo[3063:806070] 当前可视cell:(
"<NSIndexPath: 0xc000000002e00016> {length = 2, path = 0 - 23}",
"<NSIndexPath: 0xc000000003000016> {length = 2, path = 0 - 24}",
"<NSIndexPath: 0xc000000003200016> {length = 2, path = 0 - 25}",
"<NSIndexPath: 0xc000000003400016> {length = 2, path = 0 - 26}"
)
这个vvebo的列表在快速滑动中会出现大量空白内容有办法解决空白的问题吗,如果要解决这个快速滑动出现大量空白有没有好的解决方案??
只要滑动就没有数据 滑动过后才有数据
毕竟6年没更新了
请问这个效果可以分享下怎么做到的吗?
头像和微博配图都不能显示。不知道为什么
快速滑动时用户不手动停止,cell会留白很久
上拉刷新的时候,调用reloaddata,会使最后几个可见的cell也刷新,这样,tableview会“闪一下”,但是看您的vvebo中并没有这个现象,所以想请问你一个,你是怎么处理刷新的问题。 不盛感激。
Main Thread Checker: UI API called on a background thread: -[UIView frame]
在Xcode9中,系统会针对在非主线程操作UIKit里面控件属性提示warning。这个虽然不影响使用,但是出现warning,总归是要解决咯?你怎么看大哥。
?
下拉刷新数据的时候,同样的数据,但是会出现重绘的闪烁感
不管怎么样第一次都会出现闪烁感,异步自绘cell的问题
这个是刻意为之的么
使用了您的vvebo觉得真的特流畅,这才是iphone,其他的app真用处了安卓的感觉。。然后,看了您的代码,大致了解了原理,但是我也按照异步的原理,用的依然是原始的tableview的用法,不过,把cell赋值model的操作用了异步来完成,但是,结果缺不行,我的数据是加载完成的,但是,数据却并不能想你的一样马上显示出来,不知道为什么,您可以帮我解释下嘛》?
部分 代码
(void)setModel:(BuildModel *)model{
_model = model;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
CGFloat width;
[_houseImgView setBackgroundColor:[UIColor backgroundColor]];
[_houseImgView sd_setImageWithURL:kURLFromString(_model.path) placeholderImage:_houseImgView.image completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
if (image.size.width) {
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.