Amends contsraints on HostingControllers
This has the effect of pushing the explainer text up to the centre alignment of the tableviews.
This commit is contained in:
parent
3b5dfb38ec
commit
3580739b8d
|
@ -231,7 +231,6 @@ private extension AccountsPreferencesViewController {
|
|||
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
detailView.addSubview(controller.view)
|
||||
detailView.addFullSizeConstraints(forSubview: controller.view)
|
||||
|
||||
}
|
||||
|
||||
func hideController() {
|
||||
|
@ -252,7 +251,12 @@ private extension AccountsPreferencesViewController {
|
|||
addChild(textHostingController)
|
||||
textHostingController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
detailView.addSubview(textHostingController.view)
|
||||
detailView.addFullSizeConstraints(forSubview: textHostingController.view)
|
||||
detailView.addConstraints([
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .top, relatedBy: .equal, toItem: detailView, attribute: .top, multiplier: 1, constant: 1),
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .bottom, relatedBy: .equal, toItem: detailView, attribute: .bottom, multiplier: 1, constant: -deleteButton.frame.height),
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .width, relatedBy: .equal, toItem: detailView, attribute: .width, multiplier: 1, constant: 1)
|
||||
])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,11 @@ private extension ExtensionPointPreferencesViewController {
|
|||
addChild(textHostingController)
|
||||
textHostingController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
detailView.addSubview(textHostingController.view)
|
||||
detailView.addFullSizeConstraints(forSubview: textHostingController.view)
|
||||
detailView.addConstraints([
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .top, relatedBy: .equal, toItem: detailView, attribute: .top, multiplier: 1, constant: 1),
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .bottom, relatedBy: .equal, toItem: detailView, attribute: .bottom, multiplier: 1, constant: -deleteButton.frame.height),
|
||||
NSLayoutConstraint(item: textHostingController.view, attribute: .width, relatedBy: .equal, toItem: detailView, attribute: .width, multiplier: 1, constant: 1)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue