Redirect Rules: implements redirect rules UI
This commit is contained in:
@@ -29,17 +29,22 @@ class GenericContentView<View, Configuration> : UIView, UIContentView
|
||||
self.applicator = applicator
|
||||
super.init(frame: .zero)
|
||||
addSubview(view)
|
||||
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let guide = layoutMarginsGuide
|
||||
NSLayoutConstraint.activate([
|
||||
view.leadingAnchor.constraint(equalTo: guide.leadingAnchor),
|
||||
view.trailingAnchor.constraint(equalTo: guide.trailingAnchor),
|
||||
view.topAnchor.constraint(equalTo: guide.topAnchor),
|
||||
view.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
|
||||
])
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
view.frame = bounds.inset(by: insets)
|
||||
}
|
||||
|
||||
internal func apply(_ configuration: Configuration) {
|
||||
applicator(configuration, view)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user