'throttle(_:latest:scheduler:)' is deprecated: Use DispatchTimeInterval overload instead.

接收一个有点年头的代码,一直报一个警告

'throttle(_:latest:scheduler:)' is deprecated: Use DispatchTimeInterval overload instead.

老版本:

.throttle(0.5, scheduler: MainScheduler.instance)

改成现在的新版本

.throttle(RxTimeInterval.milliseconds(500), scheduler: MainScheduler.instance)

你可能感兴趣的:('throttle(_:latest:scheduler:)' is deprecated: Use DispatchTimeInterval overload instead.)