Frame calculations
This commit is contained in:
parent
974425b72d
commit
709d6ddba7
|
@ -95,11 +95,11 @@ open class ListView: UIView, UIGestureRecognizerDelegate {
|
|||
super.layoutSubviews()
|
||||
if shouldReloadData {
|
||||
panGestureRecognizer.isEnabled = isScrollEnabled && itemsCount > 1
|
||||
}
|
||||
let size = self.bounds.size
|
||||
itemSize = CGSize(width: size.width - (marginForItem.left + marginForItem.right), height: size.height - (marginForItem.top + marginForItem.bottom))
|
||||
populateVisibleItems()
|
||||
delegate?.listView(self, didChangeDisplayItemAt: current?.itemIndex ?? 0, with: scrollOffset)
|
||||
}
|
||||
shouldReloadData = false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue