vds_ios/VDS/PropertyWrappers/UsesAutoLayout.swift
Matt Bruce d0b2dfd0b1 refactored propertywrappers
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-08-11 15:12:14 -05:00

24 lines
468 B
Swift

//
// UseAutoLayout.swift
// VDS
//
// Created by Matt Bruce on 8/11/22.
//
import Foundation
import UIKit
@propertyWrapper
public struct UsesAutoLayout<T: UIView> {
public var wrappedValue: T {
didSet {
wrappedValue.translatesAutoresizingMaskIntoConstraints = false
}
}
public init(wrappedValue: T) {
self.wrappedValue = wrappedValue
wrappedValue.translatesAutoresizingMaskIntoConstraints = false
}
}