Last active
July 24, 2019 09:30
-
-
Save zakbarlow1995/88aab25145f705fc57648c2b2f1393a7 to your computer and use it in GitHub Desktop.
UIView extension to add views variadically to the view-hierarchy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIView { | |
func addSubviews(_ views: UIView...) { | |
views.forEach { addSubview($0) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment