尝试保存多个播放列表,并在以后播放。
这是代码,它配置逻辑以显示单元格数据。
let temp = rule?.valueForKey("music") as! NSArray
musicArray = temp as! [MPMediaItem]
print("musicArray = \(musicArray)=========>")
print(musicArray[0])
musicLabel.text = musicArray[0].title
这是错误日志,
musicArray = [<MPConcreteMediaItem: 0x147e98ce0> 4230548632108111364, <MPConcreteMediaItem: 0x147dbdb90> 1821425359156734603, <MPConcreteMediaItem: 0x147dc3630> 5879796615610011657, <MPConcreteMediaItem: 0x147dc61c0> 1821425359156734604]=========>RuleViewCell
<MPConcreteMediaItem: 0x147e98ce0> 4230548632108111364
fatal error: unexpectedly found nil while unwrapping an Optional value