mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix content inset problems if ASViewControllers root node has usesImplicitHierarchyManagement set to YES
There are content inset problems if a ASViewController is initialized with a root node (e.g a ASCollectionNode subclass) that has usesImplicitHierarchyManagement set to YES. The reason for that is that the subviews (e.g. the UICollectionView) of the ASViewController root node get's added to the view hierarchy in measureWithSizeRange: in ASDisplayNode. measureWithSizeRange: of the root node is called in -viewWillLayoutSubviews in ASViewController. That is too late, so UIKit does not apply the automatic content inset to the UICollectionView anymore.
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
_ensureDisplayed = YES;
|
||||
[_node measureWithSizeRange:[self nodeConstrainedSize]];
|
||||
[_node recursivelyFetchData];
|
||||
|
||||
[self updateCurrentRangeModeWithModeIfPossible:ASLayoutRangeModeFull];
|
||||
|
||||
Reference in New Issue
Block a user