RxSwift: Use Zip with different type observables

前端 未结 3 1803
误落风尘
误落风尘 2021-02-14 05:28

I\'m using RxSwift 2.0.0-beta

How can I combine 2 observables of different types in a zip like manner?

// This works
[just(1), just(1)].zip { intElement         


        
3条回答
  •  梦毁少年i
    2021-02-14 05:43

    This works for me. I tested it in Xcode7, RxSwift-2.0.0-beta

    zip(just(1), just("!")) { (a, b) in 
        return (a,b)
    }
    

提交回复
热议问题