Skip to content

Instantly share code, notes, and snippets.

View SwiftTsubame's full-sized avatar
🌶️
Flying

Haiyan Ma SwiftTsubame

🌶️
Flying
  • Barcelona
View GitHub Profile
@SwiftTsubame
SwiftTsubame / UIViewLayoutAnchors.swift
Last active November 27, 2017 14:34
UIView Layout Anchors
// Inspired by UIView Anchors from Brian Voong. Please check out his work at https://github.com/bhlvoong/LBTAComponents
extension UIView {
public func addSubViewList(_ view: UIView...) {
view.forEach { self.addSubview($0) }
}
public func fillSuperview() {
translatesAutoresizingMaskIntoConstraints = false
if let superview = superview {