5
let action: Action<AnyObject?, Bool, NSError> = Action { _ in
if self.flag {
return self.fooSignalProducer // SignalProducer<Bool, NoError>
} else {
return self.barSignalProducer // SignalProducer<Bool, NSError>
}
}
ReactiveCocoa 3. Action<AnyObject?, Bool, NSError>
Bu kod bir örneğini oluşturma çalıştı hata 'SignalProducer<Bool, NoError>' is not convertible to 'SignalProducer<Bool, NSError>'
ile hazırlanması için mümkün değildir.
SignalProducer<Bool, NoError>
'u SignalProducer<Bool, NSError>
'a nasıl dönüştürebilirim?
'promoteErrors() 'için kullanışlıdır "NoError" dan yükseltme özel durumu. –
@ JustinSpahr-Summers Bunu işaretlediğiniz için teşekkürler! Cevabı değiştirdim. – Simon