Chapter 4 - error

i have problem in challenge 2, in func save:

@IBAction func actionSave() {
guard let image = imagePreview.image else {return}

    PhotoWriter.save(image)
        .asSingle()
        .subscribe(
            onSuccess: { [weak self] id in
                self?.showMessage("Saved with id: \(id)")
                self?.actionClear()
            },
            onError: { [weak self] error in
                self?.showMessage("Error", description: error.localizedDescription)
            }
        )
        .disposed(by: disposeBag)
}

28

i check project challenge form book RxSwift for chapter 4 and my code is the same as the code in the book, but i have problem how screenshot, help me pls

That static func is defined in another area. Look in Classes/PhotoWriter.swift.

For me it’s on line 39.

Cheers,

Ed

i delete static, error change PhotoWriter.save(image) to <<‘UIImage’ is not convertible to ‘PhotoWriter’>>

@xakacuk Do you still have issues with this?