This repository was archived by the owner on Aug 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
JSQMessagesViewController/Layout Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ - (void)prepareLayout
270
270
CGFloat padding = -100 .0f ;
271
271
CGRect visibleRect = CGRectInset (self.collectionView .bounds , padding, padding);
272
272
273
- NSArray *visibleItems = [super layoutAttributesForElementsInRect: visibleRect];
273
+ NSArray *visibleItems = [[ NSArray alloc ] initWithArray: [ super layoutAttributesForElementsInRect: visibleRect] copyItems: YES ];
274
274
NSSet *visibleItemsIndexPaths = [NSSet setWithArray: [visibleItems valueForKey: NSStringFromSelector (@selector (indexPath ))]];
275
275
276
276
[self jsq_removeNoLongerVisibleBehaviorsFromVisibleItemsIndexPaths: visibleItemsIndexPaths];
@@ -281,7 +281,7 @@ - (void)prepareLayout
281
281
282
282
- (NSArray *)layoutAttributesForElementsInRect : (CGRect)rect
283
283
{
284
- NSArray *attributesInRect = [[super layoutAttributesForElementsInRect: rect] copy ];
284
+ NSArray *attributesInRect = [[NSArray alloc ] initWithArray: [ super layoutAttributesForElementsInRect: rect] copyItems: YES ];
285
285
286
286
if (self.springinessEnabled ) {
287
287
NSMutableArray *attributesInRectCopy = [attributesInRect mutableCopy ];
You can’t perform that action at this time.
0 commit comments