mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Improve deprecation situation for 2.0 (#2514)
* Improve deprecations for 2.0 - Add deprecations for node / layoutSpec style properties - Implement missing methods on ASDisplay from deprecation header - Cleanup all of the deprecation categories * Remove DeprecatedProtocolMethods * Fix "Life without Cocoapods" * Update comments
This commit is contained in:
committed by
GitHub
parent
f09b92641c
commit
4464b7de60
@@ -3471,8 +3471,6 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority";
|
||||
|
||||
#pragma mark - Deprecated
|
||||
|
||||
ASLayoutElementStyleForwarding
|
||||
|
||||
- (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize
|
||||
{
|
||||
return [self layoutThatFits:constrainedSize parentSize:constrainedSize.max];
|
||||
@@ -3642,11 +3640,6 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
|
||||
self.debugName = name;
|
||||
}
|
||||
|
||||
- (CGSize)measure:(CGSize)constrainedSize
|
||||
{
|
||||
return [self layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
|
||||
}
|
||||
|
||||
- (void)setPreferredFrameSize:(CGSize)preferredFrameSize
|
||||
{
|
||||
// Deprecated preferredFrameSize just calls through to set width and height
|
||||
@@ -3661,6 +3654,49 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
|
||||
return isPoints ? CGSizeMake(size.width.value, size.height.value) : CGSizeZero;
|
||||
}
|
||||
|
||||
- (CGSize)measure:(CGSize)constrainedSize
|
||||
{
|
||||
return [self layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
|
||||
}
|
||||
|
||||
ASLayoutElementStyleForwarding
|
||||
|
||||
- (void)visibilityDidChange:(BOOL)isVisible
|
||||
{
|
||||
if (isVisible) {
|
||||
[self didEnterVisibleState];
|
||||
} else {
|
||||
[self didExitVisibleState];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)visibleStateDidChange:(BOOL)isVisible
|
||||
{
|
||||
if (isVisible) {
|
||||
[self didEnterVisibleState];
|
||||
} else {
|
||||
[self didExitVisibleState];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)displayStateDidChange:(BOOL)inDisplayState
|
||||
{
|
||||
if (inDisplayState) {
|
||||
[self didEnterVisibleState];
|
||||
} else {
|
||||
[self didExitVisibleState];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadStateDidChange:(BOOL)inLoadState
|
||||
{
|
||||
if (inLoadState) {
|
||||
[self didEnterPreloadState];
|
||||
} else {
|
||||
[self didExitPreloadState];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)cancelLayoutTransitionsInProgress
|
||||
{
|
||||
[self cancelLayoutTransition];
|
||||
|
||||
Reference in New Issue
Block a user