Comments (11)
我这边在 iPhone6s 和 iPhone12 上测试, 都没有出现卡顿现象!! 建议在真机上跑
from knphotobrowser.
我也是用iPhone 12运行的。IMController的数据源更换成网络图片,不要本地图片。然后点击tableview列表中的最后一张图,由此打开photobrowser,然后向右滑动翻页,显示数据源数组头部的图片,就会看到卡顿了。
from knphotobrowser.
可能是 IMController tableViewCell写的有问题, 若确定是Demo的问题, 则不回复你了! 若是 photoBrowser的问题, 我这边会做修改再回复你的!
from knphotobrowser.
Demo写的有问题罢了!!
from knphotobrowser.
不是的,在项目中用也有问题。我定位到了问题。只有这样修改才能避免翻页卡顿
-
(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
// [cell prepareForReuse];KNPhotoItems *item = self.itemsArr[indexPath.row];
// UIImageView *tempView = [self tempViewFromSourceViewWithCurrentIndex:indexPath.row];
if (item.isVideo) {
KNPhotoVideoCell *cell1 = (KNPhotoVideoCell *)cell;
// [cell1 playerWithURL:item.url placeHolder:tempView.image];
[cell1 playerWithURL:item.url placeHolder:item.sourceImage];
if (_isNeedAutoPlay == true) {
[cell1 setIsNeedAutoPlay:true];
}
[cell1 setPresentedMode:self.presentedMode];
} else {
KNPhotoBaseCell *cell1 = (KNPhotoBaseCell *)cell;
// [cell1 sd_ImageWithUrl:item.url placeHolder:tempView.image photoItem:item];
[cell1 sd_ImageWithUrl:item.url placeHolder:item.sourceImage photoItem:item];
[cell1 setPresentedMode:self.presentedMode];
}
}
from knphotobrowser.
有没有考虑过 item.sourceImage 为空!
from knphotobrowser.
是会有这样的问题,但是这样修改之后至少它不卡了。我给你邮箱发调试视频吧,真的很卡的。
from knphotobrowser.
你这边别用 IMController 测试了, 用其他的Controller试试, 比如 第一个Controller, 不会出现卡顿现象
from knphotobrowser.
试了一下!! 你说的卡顿现象 只会在 低网速的时候 才会出现!
排查了一下原因: 是因为 根据网络图片的url 来获取 size, 这样会阻塞主线程!!
现在已经修改过了!! 更新一下新版本即可
from knphotobrowser.
大佬给力
from knphotobrowser.
我用的2.4.6版本滑动的时候也会卡,iPhone6s plus iOS11系统
- (UIImageView *)tempViewFromSourceViewWithCurrentIndex:(NSInteger)currentIndex这个方法的确引起了卡顿
from knphotobrowser.
Related Issues (20)
- 2.5.4 Pod 添加的依赖找不到 bundle 中的图片资源 HOT 5
- [feature request]iPad分屏支持 HOT 3
- 大佬,只支持竖屏的应用如何支持全屏播放视频呢 HOT 1
- 视频预览 拖动进度条没有效果 HOT 4
- 小圆点点没切换图片行为? HOT 1
- 如何设置如下场景的视频播放? HOT 3
- -[KNPhotoAVPlayerView retain]: message sent to deallocated instance 0x11ed29510 HOT 2
- 视频播放没声音... HOT 4
- 是否能当成View来使用 HOT 5
- 发现了一个必崩的bug HOT 8
- 请问支持视频播放控件的自定义吗 HOT 1
- 老铁,这么好的库,强烈建议Swift版啊 HOT 1
- 大佬,这么好的库,可以加上视频缩放吗,手势放大或者缩小视频 HOT 1
- 一个动画的问题 HOT 2
- 本地图片支持 HOT 1
- 加载本地视频时报错 HOT 1
- 由于我是加载的本地图片,有什么办法能隐藏掉progressHUD吗? HOT 1
- 图片放大后浏览大图和左右滑动的手势 会冲突,可以调整什么滑动的系数 解决吗 HOT 2
- 能坚持更新就很厉害了,赞了
- 一张图 高度小于屏幕高度的图 放大之后 ,左右滑动,很容易切换到下一张图上,有没有什么办法可以优化 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 knphotobrowser.