Merge branch 'charlesmchen/shareExtensionNavbar' into release/2.34.0

pull/1/head
Matthew Chen 6 years ago
commit a5d9a40c8c

@ -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)
}

@ -1,5 +1,5 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
@ -156,11 +156,13 @@ public class OWSNavigationBar: UINavigationBar {
}
public override func layoutSubviews() {
if CurrentAppContext().isMainApp {
guard OWSWindowManager.shared().hasCall() else {
super.layoutSubviews()
return
}
guard CurrentAppContext().isMainApp else {
super.layoutSubviews()
return
}
guard OWSWindowManager.shared().hasCall() else {
super.layoutSubviews()
return
}
guard #available(iOS 11, *) else {

Loading…
Cancel
Save