I'm using RxSwift to observe the frame of one UIView. Here is my code in the view
self.rx.observe(CGRect.self, #keyPath(UIView.frame))
.subscribe(onNext: { frame in
print("Got new frame \(frame)")
})
.debug()
.disposed(by: disposeBag)
But it only prints once and won't run the second time when I change view frame. Does anyone know why this happen? Thanks in advance!