Is there any way to put more than 8 observable in combineLatest in RxSwift?
Here is my current implementation:
let registerUserParameters = Observable.combineLatest(
firstname.asObservable(),
lastname.asObservable(),
email.asObservable(),
mobile.asObservable(),
addresses.asObservable(),
cities.asObservable(),
pword.asObservable(),
confirm_pword.asObservable(),
instagramid.asObservable(),
facebookid.asObservable()) {
($0, $1, $2, $3, $4, $5, $6, $7, $8, $9)
}
I found out that combineLatest only accept up to 8 parameters based on its function.
public static func combineLatest<O1, O2, O3, O4, O5, O6, O7, O8>(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> Self.E) -> RxSwift.Observable<Self.E> where O1 : ObservableType, O2 : ObservableType, O3 : ObservableType, O4 : ObservableType, O5 : ObservableType, O6 : ObservableType, O7 : ObservableType, O8 : ObservableType)