美文网首页
封装的视频上传不走视频选择的回调

封装的视频上传不走视频选择的回调

作者: Skysama | 来源:发表于2019-05-22 20:48 被阅读0次
     //增加视频 
    - (void)clicktoAddVideo{
        
        ZHVideo *zhvideo = [[ZHVideo alloc]init];
        [zhvideo initvideowithViewController:self];
        [zhvideo setUpvideoblock:^(NSString *VideoUrlStr) {
            self.videoUrlString = VideoUrlStr;
        }];
       
    }
    

    因为走完这个方法之后 ZHVideo 就被系统释放了 UIImagePickerControllerDelegate 也就为nill
    修改 后 让它不释放就行了

    @property (nonatomic, strong) ZHVideo *zhVideo;
    
    //增加视频
    - (void)clicktoAddVideo{
        
        ZHVideo *zhvideo = [[ZHVideo alloc]init];
        [zhvideo initvideowithViewController:self];
        [zhvideo setUpvideoblock:^(NSString *VideoUrlStr) {
            self.videoUrlString = VideoUrlStr;
        }];
        _zhVideo = zhvideo;
    }
    
    

    相关文章

      网友评论

          本文标题:封装的视频上传不走视频选择的回调

          本文链接:https://www.haomeiwen.com/subject/dmjpzqtx.html