Skip to content

Instantly share code, notes, and snippets.

@serhii-londar
serhii-londar / AutoLayout+Extension.swift
Created October 8, 2019 22:18 — forked from yawboafo/AutoLayout+Extension.swift
A UIView Extensions to help you constrains a view programatically and simplified
import UIKit
public extension UIView{
func setWith(_ width: CGFloat){
self.widthAnchor.constraint(equalToConstant: width).isActive = true
}
func setHeight(_ width: CGFloat){
self.heightAnchor.constraint(equalToConstant: width).isActive = true
}