From 5e96769a12a383b1e0fd490b49a7722dd8ac1aa6 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 2 Apr 2019 15:16:38 -0600 Subject: [PATCH] resize voice note bar with rotation --- .../ConversationView/ConversationInputToolbar.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index 2f980384b..689a0de88 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -569,7 +569,7 @@ const CGFloat kMaxTextViewHeight = 98; self.voiceMemoUI = [UIView new]; self.voiceMemoUI.backgroundColor = Theme.toolbarBackgroundColor; [self addSubview:self.voiceMemoUI]; - self.voiceMemoUI.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height); + [self.voiceMemoUI autoPinEdgesToSuperviewEdges]; SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, _voiceMemoUI); self.voiceMemoContentView = [UIView new]; @@ -671,8 +671,7 @@ const CGFloat kMaxTextViewHeight = 98; [self.recordingLabel autoPinLeadingToTrailingEdgeOfView:imageView offset:5.f]; [cancelLabel autoVCenterInSuperview]; [cancelLabel autoHCenterInSuperview]; - [self.voiceMemoUI setNeedsLayout]; - [self.voiceMemoUI layoutSubviews]; + [self.voiceMemoUI layoutIfNeeded]; // Slide in the "slide to cancel" label. CGRect cancelLabelStartFrame = cancelLabel.frame;