Fix safe area insets in SAE.

pull/1/head
Matthew Chen 6 years ago
parent 50f9a089bf
commit 635a644e2f

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -366,7 +366,8 @@ public class ContactShareApprovalViewController: OWSViewController, EditContactS
scrollView.preservesSuperviewLayoutMargins = false
self.view.addSubview(scrollView)
scrollView.layoutMargins = .zero
scrollView.autoPinWidthToSuperview()
scrollView.autoPinEdge(toSuperviewSafeArea: .leading)
scrollView.autoPinEdge(toSuperviewSafeArea: .trailing)
scrollView.autoPin(toTopLayoutGuideOf: self, withInset: 0)
scrollView.autoPinEdge(toSuperviewEdge: .bottom)

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -78,7 +78,8 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
// Recipient Row
let recipientRow = createRecipientRow()
view.addSubview(recipientRow)
recipientRow.autoPinWidthToSuperview()
recipientRow.autoPinEdge(toSuperviewSafeArea: .leading)
recipientRow.autoPinEdge(toSuperviewSafeArea: .trailing)
recipientRow.autoPin(toTopLayoutGuideOf: self, withInset: 0)
// Text View
@ -91,7 +92,8 @@ public class MessageApprovalViewController: OWSViewController, UITextViewDelegat
textView.contentInset = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 0.0)
textView.textContainerInset = UIEdgeInsets(top: 10.0, left: 10.0, bottom: 10.0, right: 10.0)
view.addSubview(textView)
textView.autoPinWidthToSuperview()
textView.autoPinEdge(toSuperviewSafeArea: .leading)
textView.autoPinEdge(toSuperviewSafeArea: .trailing)
textView.autoPinEdge(.top, to: .bottom, of: recipientRow)
textView.autoPin(toBottomLayoutGuideOf: self, withInset: 0)
}

Loading…
Cancel
Save