Difference between centerXAnchor and center.x

Viewed 3903

As far as I know the two main ways to center an element horizontally is to use the following techniques:

1.

label.center.x = imageView.center.x

2.

label.centerXAnchor.constraint(equalTo: imageView.centerXAnchor)

What is the difference, if any, between these two methods?

2 Answers
Related