Conversation
…tentInsets overriding
Codecov Report
@@ Coverage Diff @@
## master #454 +/- ##
==========================================
- Coverage 63.91% 63.84% -0.07%
==========================================
Files 76 77 +1
Lines 3907 3925 +18
==========================================
+ Hits 2497 2506 +9
- Misses 1410 1419 +9
Continue to review full report at Codecov.
|
| } | ||
| } | ||
|
|
||
| open func updateContentViewOffset(_ newValue: CGPoint) { |
There was a problem hiding this comment.
Why do you need this function? Is it the only function that should be called when you modify content offset? It's not used everywhere now, so, it's quite confusing. If you want to use it only when you adjust content insets then it's better to extract related code from adjustCollectionViewInsets into adjustCollectionViewOffset function and call it directly when needed. In this case, you won't need to pass any additional parameter to adjustCollectionViewInsets function
| private func adjustCollectionViewInsets() { | ||
| public var allContentFits: Bool { | ||
| let inputHeightWithKeyboard = self.view.bounds.height - self.inputContainer.frame.minY | ||
| let newInsetTop = self.topLayoutGuide.length + self.layoutConfiguration.contentInsets.top |
There was a problem hiding this comment.
What does that mean "new"? Do you change insets here? Can you change names toinsetTop and insetBottom?
| guard shouldUpdateContentOffset else { return } | ||
|
|
||
| let inputIsAtBottom = self.view.bounds.maxY - self.inputContainer.frame.maxY <= 0 | ||
| if allContentFits { |
No description provided.