Linking two UIview frames / positions using Rxswift
I want to change the position of view2 automatically when the position of view1 changes and will bind both view positions using Rxswift.
I am trying to observe the frame / position of an image using this
view.rx.observe(CGRect.self,"frame")
.subscribe(onNext: {
print($0 ?? (0,0))
})
it print the frame in init mode but when the view position is changed using constraints
self.constraintHorizontalCenterView.constant = 1000
it doesn't mean anything that this code doesn't respect the view position ...
Is there a way to watch for constant view position or view position anchors?
+3
source to share
2 answers