From 6666b0ff218ef2c224bc2a28fadbdebe24e4e7c0 Mon Sep 17 00:00:00 2001 From: Nathan Tannar Date: Fri, 8 Dec 2017 12:22:29 -0800 Subject: [PATCH] Removed Unneeded Code --- Example/Podfile.lock | 10 +++++----- Example/Sources/ConversationViewController.swift | 9 +++++---- Sources/Views/InputStackView.swift | 8 -------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index cbce23e4..9fad67d8 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - MessageKit (0.10.2) + - MessageKit (0.11.0) DEPENDENCIES: - - MessageKit (from `../MessageKit.podspec`) + - MessageKit (from `../`) EXTERNAL SOURCES: MessageKit: - :path: ../MessageKit.podspec + :path: ../ SPEC CHECKSUMS: - MessageKit: a1e8d0f1d7785891e4b37f6252898f23cd8f8b6a + MessageKit: 96caa3ba2c32f9393b406256c5caa29ae9189d71 -PODFILE CHECKSUM: 9ac65b8dedf0e1b63fea245b089b6645c4e66309 +PODFILE CHECKSUM: cecdb7bc8129cf99f66de9f68eea3256fec30c3d COCOAPODS: 1.3.1 diff --git a/Example/Sources/ConversationViewController.swift b/Example/Sources/ConversationViewController.swift index e3859acc..35705c7d 100644 --- a/Example/Sources/ConversationViewController.swift +++ b/Example/Sources/ConversationViewController.swift @@ -74,12 +74,12 @@ class ConversationViewController: MessagesViewController { defer { isTyping = !isTyping - messageInputBar.layoutStackViews([.top]) } if isTyping { messageInputBar.topStackView.arrangedSubviews.first?.removeFromSuperview() + messageInputBar.topStackViewPadding = .zero } else { @@ -89,9 +89,10 @@ class ConversationViewController: MessagesViewController { messageInputBar.topStackView.addArrangedSubview(label) -// messageInputBar.topStackViewPadding.top = 6 -// messageInputBar.topStackViewPadding.left = 12 - // The backgroundView doesn't include the topStackView. This is so things in the topStackView can have transparent backgrounds if you need it that way + messageInputBar.topStackViewPadding.top = 6 + messageInputBar.topStackViewPadding.left = 12 + + // The backgroundView doesn't include the topStackView. This is so things in the topStackView can have transparent backgrounds if you need it that way or another color all together messageInputBar.backgroundColor = messageInputBar.backgroundView.backgroundColor } diff --git a/Sources/Views/InputStackView.swift b/Sources/Views/InputStackView.swift index 41aa1a14..0c86c315 100644 --- a/Sources/Views/InputStackView.swift +++ b/Sources/Views/InputStackView.swift @@ -69,12 +69,4 @@ open class InputStackView: UIStackView { distribution = .fill alignment = .bottom } - - open override func layoutIfNeeded() { - super.layoutIfNeeded() - - // We need to invalidate the size of the superview (MessageInputBar) in case the subview heights have changed - // and thus the superview size needs to change - superview?.invalidateIntrinsicContentSize() - } }