The code is not working on Xcode Version 8.3.2.
The error is on this line “print(label: “1)”, event: $0)”.
It says “Incorrect argument in call”.
The following code will work:
// 3
subject
.subscribe { event in
print("1), \(event)")
}
.addDisposableTo(disposeBag)
subject
.subscribe { event in
print("2), \(event)")
}
.addDisposableTo(disposeBag)
Just found out I have kept the code apeared earlier:
// 2
func print<T: CustomStringConvertible>(label: String, event: Event<T>) {
print(label, event.element ?? event.error ?? event)
}
Oh no, I can not delete my own post!
Don’t worry, I guess only the forum admins can delete posts. The important thing is you found where the issue was