Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
ASCollectionView
Commits
25968533
Commit
25968533
authored
4 years ago
by
Toby Brennan
Browse files
Options
Download
Email Patches
Plain Diff
Minor code change
parent
1dbdb711
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/ASCollectionView/Implementation/ASCollectionView.swift
+11
-8
...es/ASCollectionView/Implementation/ASCollectionView.swift
with
11 additions
and
8 deletions
+11
-8
Sources/ASCollectionView/Implementation/ASCollectionView.swift
+
11
-
8
View file @
25968533
...
...
@@ -836,14 +836,17 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
var
lastContentSize
:
CGSize
=
.
zero
func
didUpdateContentSize
(
_
size
:
CGSize
)
{
guard
let
cv
=
collectionViewController
?
.
collectionView
,
cv
.
contentSize
!=
lastContentSize
,
cv
.
contentSize
.
width
!=
0
,
cv
.
contentSize
.
height
!=
0
else
{
return
}
let
firstSize
=
lastContentSize
==
.
zero
lastContentSize
=
cv
.
contentSize
parent
.
contentSizeTracker
?
.
contentSize
=
size
DispatchQueue
.
main
.
async
{
self
.
parent
.
invalidateParentCellLayout
?(
!
firstSize
)
}
guard
let
cv
=
collectionViewController
?
.
collectionView
,
cv
.
contentSize
.
width
!=
.
zero
,
cv
.
contentSize
.
height
!=
.
zero
else
{
return
}
if
cv
.
contentSize
!=
lastContentSize
{
let
firstSize
=
lastContentSize
==
.
zero
lastContentSize
=
cv
.
contentSize
parent
.
contentSizeTracker
?
.
contentSize
=
size
DispatchQueue
.
main
.
async
{
self
.
parent
.
invalidateParentCellLayout
?(
!
firstSize
)
}
}
}
// MARK: Variables used for the custom prefetching implementation
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets