26 lines
629 B
Swift
26 lines
629 B
Swift
//
|
|
// UIStackViewBuilder.swift
|
|
// ToMove
|
|
//
|
|
// Created by Saveliy Stavitsky on 3/4/20.
|
|
// Copyright © 2020 Saveliy Stavitsky. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension UIStackView {
|
|
convenience init(
|
|
subviews: [UIView] = [],
|
|
axis: NSLayoutConstraint.Axis = .vertical,
|
|
distribution: UIStackView.Distribution = .fill,
|
|
alignment: UIStackView.Alignment = .fill,
|
|
spacing: CGFloat = 0
|
|
) {
|
|
self.init(arrangedSubviews: subviews)
|
|
self.axis = axis
|
|
self.distribution = distribution
|
|
self.alignment = alignment
|
|
self.spacing = spacing
|
|
}
|
|
}
|