Git Product home page Git Product logo

Comments (8)

johnlzp avatar johnlzp commented on May 26, 2024

版本: 2.5.9
iOS版本: 15.5
机型: 模拟器(iphone13 ProMax)
报错信息:Thread 1: EXC_BAD_ACCESS (code=1, address=0x6000000000000000)

from knphotobrowser.

LuKane avatar LuKane commented on May 26, 2024

用新的版本即可!! 这个问题 当初我自己也发现了! 所以才更新了新的 pod版本

from knphotobrowser.

johnlzp avatar johnlzp commented on May 26, 2024

更新到了2.6.2,还是崩溃

from knphotobrowser.

johnlzp avatar johnlzp commented on May 26, 2024

因为我在页面左上角加了个退出按钮,调用dismiss方法,是不是和这个有关

from knphotobrowser.

johnlzp avatar johnlzp commented on May 26, 2024

因为我在页面左上角加了个退出按钮,调用dismiss方法,是不是和这个有关

解决了,确实直接调用dismiss造成的,按照手势cancel的流程解决了

from knphotobrowser.

Alex92908 avatar Alex92908 commented on May 26, 2024

KNPhotoAVPlayerView以及KNPhotoLocateAVPlayerView的dealloc方法添加[self playerWillReset];的调用,避免avplayerItem的观察者没被释放造成崩溃(打开视频,左上角按钮关闭,再打开视频,崩溃),这样感觉更优。

from knphotobrowser.

LuKane avatar LuKane commented on May 26, 2024

OK! 我回头看看

from knphotobrowser.

LuKane avatar LuKane commented on May 26, 2024

我试了多次, 其实不会出现这种闪退的现象!
我的具体代码:

这里用一个属性:  weak去修饰
@property (nonatomic,weak  ) KNPhotoBrowser *photoBrowser;
点击某一个图片或视频进行展示图片或播放视频
KNPhotoBrowser *photoBrowser = [[KNPhotoBrowser alloc] init];

UIView *tempView = [[UIView alloc] initWithFrame:CGRectMake(50, 100, 90, 90)];
tempView.backgroundColor = UIColor.lightGrayColor;
[tempView addGestureRecognizer: [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tempViewDidClick)]];
[photoBrowser createOverlayViewArrOnTopView:@[tempView] animated:false followAnimated:true];
    
photoBrowser.itemsArr = [self.itemsArr copy];
photoBrowser.placeHolderColor = UIColor.lightTextColor;
photoBrowser.currentIndex = tap.view.tag;
photoBrowser.delegate = self;
photoBrowser.isSoloAmbient = true;
photoBrowser.isNeedPageNumView = true;
photoBrowser.isNeedRightTopBtn = false;
photoBrowser.isNeedLongPress = true;
photoBrowser.isNeedPanGesture = true;
photoBrowser.isNeedPrefetch = true;
photoBrowser.isNeedAutoPlay = true;
photoBrowser.isNeedOnlinePlay = true;
[photoBrowser present];
self.photoBrowser = photoBrowser;
取消视频播放, 相当于直接 dismiss
- (void)tempViewDidClick {
    [self.photoBrowser dismiss];
}

以上操作不会出现闪退现象!! 不知如何才能复现您这边提出的问题

from knphotobrowser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.