diff --git a/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m b/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m index 130554b73..bb6785950 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/AttachmentUploadView.m @@ -95,14 +95,10 @@ NS_ASSUME_NONNULL_BEGIN stackView.layoutMarginsRelativeArrangement = YES; [self addSubview:stackView]; [stackView autoCenterInSuperview]; - [NSLayoutConstraint - autoSetPriority:UILayoutPriorityRequired - forConstraints:^{ - [stackView autoPinEdgeToSuperviewMargin:ALEdgeTop relation:NSLayoutRelationGreaterThanOrEqual]; - [stackView autoPinEdgeToSuperviewMargin:ALEdgeBottom relation:NSLayoutRelationGreaterThanOrEqual]; - [stackView autoPinEdgeToSuperviewMargin:ALEdgeLeading relation:NSLayoutRelationGreaterThanOrEqual]; - [stackView autoPinEdgeToSuperviewMargin:ALEdgeTrailing relation:NSLayoutRelationGreaterThanOrEqual]; - }]; + [stackView autoPinEdgeToSuperviewMargin:ALEdgeTop relation:NSLayoutRelationGreaterThanOrEqual]; + [stackView autoPinEdgeToSuperviewMargin:ALEdgeBottom relation:NSLayoutRelationGreaterThanOrEqual]; + [stackView autoPinEdgeToSuperviewMargin:ALEdgeLeading relation:NSLayoutRelationGreaterThanOrEqual]; + [stackView autoPinEdgeToSuperviewMargin:ALEdgeTrailing relation:NSLayoutRelationGreaterThanOrEqual]; } - (void)setIsAttachmentReady:(BOOL)isAttachmentReady diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m index 79bafd92e..626d81760 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m @@ -473,12 +473,9 @@ NS_ASSUME_NONNULL_BEGIN [self insertAnyTextViewsIntoStackView:textViews]; CGSize bubbleSize = [self measureSize]; - [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired - forConstraints:^{ - [self.viewConstraints addObjectsFromArray:@[ - [self autoSetDimension:ALDimensionWidth toSize:bubbleSize.width], - ]]; - }]; + [self.viewConstraints addObjectsFromArray:@[ + [self autoSetDimension:ALDimensionWidth toSize:bubbleSize.width], + ]]; if (bodyMediaView) { OWSAssert(bodyMediaSize); [self.viewConstraints @@ -977,7 +974,7 @@ NS_ASSUME_NONNULL_BEGIN UIImageView *videoPlayButton = [[UIImageView alloc] initWithImage:videoPlayIcon]; [stillImageView addSubview:videoPlayButton]; [videoPlayButton autoCenterInSuperview]; - [self addAttachmentUploadViewIfNecessary:^(BOOL isAttachmentReady) { + [self addAttachmentUploadViewIfNecessaryWithAttachmentStateCallback:^(BOOL isAttachmentReady) { videoPlayButton.hidden = !isAttachmentReady; }]; @@ -1078,10 +1075,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)addAttachmentUploadViewIfNecessary { - [self addAttachmentUploadViewIfNecessary:nil]; + [self addAttachmentUploadViewIfNecessaryWithAttachmentStateCallback:nil]; } -- (void)addAttachmentUploadViewIfNecessary:(nullable AttachmentStateBlock)attachmentStateCallback +- (void)addAttachmentUploadViewIfNecessaryWithAttachmentStateCallback: + (nullable AttachmentStateBlock)attachmentStateCallback { OWSAssert(self.attachmentStream); diff --git a/Signal/src/views/RemoteVideoView.m b/Signal/src/views/RemoteVideoView.m index a9789eb8d..aa7f885ce 100644 --- a/Signal/src/views/RemoteVideoView.m +++ b/Signal/src/views/RemoteVideoView.m @@ -48,10 +48,7 @@ NS_ASSUME_NONNULL_BEGIN // It's inner (private) MTKView is below the status bar. for (UIView *subview in [_videoRenderer subviews]) { if ([subview isKindOfClass:[MTKView class]]) { - [NSLayoutConstraint autoSetPriority:UILayoutPriorityRequired - forConstraints:^{ - [subview autoPinEdgesToSuperviewEdges]; - }]; + [subview autoPinEdgesToSuperviewEdges]; } else { OWSFail(@"New subviews added to MTLVideoView. Reconsider this hack."); }