记录一下今天遇到的关于本地视频读取犯的错误
//读取本地视频
NSString *path = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"mp4"];
NSURL *movieURL = [NSURL fileURLWithPath:path];
代码很简单,但是一直读取不到,path为nil,几经周折,发现是导入视频时忘记勾选Add to targets选项了,比了个狗。。。删除,重新导入,OK
记录一下今天遇到的关于本地视频读取犯的错误
//读取本地视频
NSString *path = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"mp4"];
NSURL *movieURL = [NSURL fileURLWithPath:path];
代码很简单,但是一直读取不到,path为nil,几经周折,发现是导入视频时忘记勾选Add to targets选项了,比了个狗。。。删除,重新导入,OK