Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #set #center #view #swift
ADD COMMENT
Topic
Name
1+3 =