Skip to content

Commit

Permalink
Use forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Winterkvist committed Nov 11, 2015
1 parent 30f3112 commit 39b8d90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Source/BottomView/BottomContainerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public class BottomContainerView: UIView {
public override init(frame: CGRect) {
super.init(frame: frame)

for view in [borderPickerButton, pickerButton, doneButton, stackView, topSeparator] {
addSubview(view)
view.translatesAutoresizingMaskIntoConstraints = false
[borderPickerButton, pickerButton, doneButton, stackView, topSeparator].forEach {
addSubview($0)
$0.translatesAutoresizingMaskIntoConstraints = false
}

backgroundColor = pickerConfiguration.backgroundColor
Expand Down
4 changes: 1 addition & 3 deletions Source/ImageGallery/ImageGalleryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ public class ImageGalleryView: UIView {
collectionView.registerClass(ImageGalleryViewCell.self,
forCellWithReuseIdentifier: CollectionView.reusableIdentifier)

for view in [collectionView, topSeparator] {
addSubview(view)
}
[collectionView, topSeparator].forEach { addSubview($0) }

topSeparator.addSubview(indicator)
imagesBeforeLoading = 0
Expand Down

0 comments on commit 39b8d90

Please sign in to comment.