Skip to content

Commit

Permalink
Added UIStackView convenience addArrangedSubviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Dutcher committed Dec 2, 2016
1 parent ef8e85c commit 7640752
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- URBNConvenience (2.0.5)
- URBNConvenience (2.1.2)

DEPENDENCIES:
- URBNConvenience (from `../`)

EXTERNAL SOURCES:
URBNConvenience:
:path: "../"
:path: ../

SPEC CHECKSUMS:
URBNConvenience: ae4e190a12091c998061d87bd7b8796ea2ef27f8
URBNConvenience: 1da2817340e61c499d58bd89d4c5e46dbfef628a

PODFILE CHECKSUM: 4bfbebbb9fc7a9a90efd38463f9ff637cb17d94e

Expand Down
14 changes: 14 additions & 0 deletions Pod/Classes/LayoutConvenience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,17 @@ public extension UIView {
return container
}
}

@available(iOS 9.0, *)
public extension UIStackView {

public func addArrangedSubviews(_ subviews: UIView...) {
addArrangedSubviews(subviews)
}

public func addArrangedSubviews(_ subviews: [UIView]) {
for v in subviews {
addArrangedSubview(v)
}
}
}

0 comments on commit 7640752

Please sign in to comment.