Answers for "Get center of a view swiftui"

0

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
Posted by: Guest on July-01-2020
0

how to set the center in view in swift

childView.center = parentView.center
Posted by: Guest on July-01-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language