Created
September 14, 2017 10:42
-
-
Save sauravexodus/f45d6ebd1914ea36a2d909c1f5f099f8 to your computer and use it in GitHub Desktop.
Usage of Relative Dimensionsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating CGRects for your UIView frame | |
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 200.dp, height: 40.dp)) | |
//Creating constraints | |
imageView.leftAnchor.constaint(equalTo: view.leftAnchor, constant: 16.dp).isActive = true | |
//Using as a font size | |
myLabel.font = UIFont.systemFont(ofSize: 13.dp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment