how to move a view center in ios swift code example
Example 1: how to set the center in view in swift
childView.centerXAnchor.constraint(equalTo: parentView.centerXAnchor).isActive = true
childView.centerYAnchor.constraint(equalTo: parentView.centerYAnchor).isActive = true
Example 2: how to set the center in view in swift
childView.center = parentView.center