mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[Table and collection views] Consider content inset when calculating (default) element size range (#525)
* Table and collection views to consider their content inset when calculating element size range * Update CHANGELOG * Address comments * -[ASPagerNode currentPageIndex] to use pageSize instead of bounds * Update documentation in ASPagerNode * Minor change
This commit is contained in:
@@ -751,7 +751,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
{
|
||||
// Remeasure all rows if our row width has changed.
|
||||
_remeasuringCellNodes = YES;
|
||||
CGFloat constrainedWidth = self.bounds.size.width - [self sectionIndexWidth];
|
||||
UIEdgeInsets contentInset = self.contentInset;
|
||||
CGFloat constrainedWidth = self.bounds.size.width - [self sectionIndexWidth] - contentInset.left - contentInset.right;
|
||||
if (constrainedWidth > 0 && _nodesConstrainedWidth != constrainedWidth) {
|
||||
_nodesConstrainedWidth = constrainedWidth;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user