Я пытаюсь установить мой AssetService, как changeObserver, но я получаю сообщение об ошибке на следующую:Реализация PHPhotoLibraryChangeObserver протокол в быстрой
Error:(8, 14) type 'AssetService' does not conform to protocol 'PHPhotoLibraryChangeObserver'
Хотя photoLibraryDidChange является единственным необходимым методом. Вот мой код:
import UIKit
import Photos
public class AssetService : PHPhotoLibraryChangeObserver {
public init() {
// here I do some other stuff
PHPhotoLibrary.sharedPhotoLibrary().registerChangeObserver(self)
}
public func photoLibraryDidChange(changeInstance: PHChange) {
dispatch_async(dispatch_get_main_queue(), {
})
}
}