Hello i am flutter developer and new to swift. could you please help me to figure out which method is perfect or in which situation which method should I user for alignment widgets in swift?
Like : UILabel, Image,Padding , Row,COlumn , have two tips of method see below.
//Method - 1
scoreLabel.frame = CGRect( x: 50, y: 50, width: 100, height: 50)
//method - 2
NSLayoutConstraint.activate([scoreLabel.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor),
scoreLabel.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.trailingAnchor),])
So now is other any other method also for alignment or which would be used in live project or right way for every devices.