【发布时间】:2015-02-20 13:30:41
【问题描述】:
我创建了子文件夹“Sounds”并添加了文件“backstage.mp3”
这很好用:
var path = NSBundle.mainBundle().pathForResource("backstage", ofType: "mp3")!
但是当我尝试添加 inDirectory
var path = NSBundle.mainBundle().pathForResource("backstage", ofType: "mp3", inDirectory: "Sounds")!
它因致命错误而崩溃:
致命错误:在展开可选值时意外发现 nil
【问题讨论】:
标签: swift