Using NSLayoutConstraints in convenience init

Hi all,

I"m trying to create a convenience initializer that takes a NSLayoutConstraint array as parameters.

Something along the lines of the following:

convenience init(constraint: [NSLayoutConstraint]) {

This would then be implemented like the following when instantiating a new object.

let sampleClass = SampleClass([.topAnchor, .leadingAnchor])

I'm been trying to figure out how to implement this, however no luck so far. Any help would be much appreciated.