由
let myVariable = Variable<Bool>(true)
myVariable.value = false
改为
let myBehaviorRelay = BehaviorRelay<Bool>(value: true)
myBehaviorRelay.accept(false)
由
let myVariable = Variable<Bool>(true)
myVariable.value = false
改为
let myBehaviorRelay = BehaviorRelay<Bool>(value: true)
myBehaviorRelay.accept(false)
本文标题:Variable --> BehaviorRelay
本文链接:https://www.haomeiwen.com/subject/ndlfkftx.html
网友评论