//增加视频
- (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;
}
网友评论