![](/img/trans.png)
[英]Bundle.main.path(forResource:ofType:inDirectory:) returns nil
[英]Bundle.main.path(forResource:ofType:inDirectory:) returns nil when directory and filename are correct
let audioPath = Bundle.main.path(forResource: songs[indexPath.row], ofType: ".mp3", inDirectory: "Songs")!
返回nil。 songs [indexPath.row]返回正确的名称,因为它恰好位于名为“ Songs”的文件夹中。 歌曲文件夹为蓝色,并在我的构建阶段->复制捆绑资源中正确显示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.