I have a very simple question on something that I may have misunderstood.

I have two UIViews "A" and "B". If I write :

let A = UIView() // Or something else
let B = A

and then I change properties of B (for exemple the frame), will the properties of A change too ?

I though not, but I was animating a view, so I had the initial view and the final view. I created a transition view like this :

let transitionView = finalView

and then I changed the properties of transitionView, the position of a label for exemple.

When I added the final view at the end of the animation, the label was at the new position.

Why ? Thanks

Related posts

Recent Viewed