From dd7e429318d34c93a5f38e93fe4cacb967dd29a7 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 9 Aug 2018 10:08:51 -0400 Subject: [PATCH] Skip default implementation of preferredLayoutAttributesFittingAttributes. --- .../ConversationView/Cells/ConversationViewCell.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/ConversationViewCell.m b/Signal/src/ViewControllers/ConversationView/Cells/ConversationViewCell.m index b49e302b5..de62f0786 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/ConversationViewCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/ConversationViewCell.m @@ -40,6 +40,13 @@ NS_ASSUME_NONNULL_BEGIN } } +// For perf reasons, skip the default implementation which is only relevant for self-sizing cells. +- (UICollectionViewLayoutAttributes *)preferredLayoutAttributesFittingAttributes: + (UICollectionViewLayoutAttributes *)layoutAttributes +{ + return layoutAttributes; +} + @end NS_ASSUME_NONNULL_END