class Fakemediaitem: MPMediaItem {
override var persistentID: MPMediaEntityPersistentID {
get {
return self.localPersistentId
}
}
override var albumTrackNumber: Int {
get {
return Int(self.localPersistentId)
}
}
override var title: String {
get {
return "Fake title"
}
}
private var localPersistentId: MPMediaEntityPersistentID
init(_ id: MPMediaEntityPersistentID) {
self.localPersistentId = id
super.init()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
1条答案
按热度按时间wvt8vs2t1#
也许可以尝试子类化(不知道艺术作品是否有效)