From 680e6ea9f21f4a6755b5fd49f3ff19cd1dea9dd0 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 7 Jan 2019 07:58:47 +0100 Subject: [PATCH] Fix deprecated implementations warning --- Source/ASCollectionNode.mm | 6 ++++++ Source/ASCollectionView.mm | 9 +++++++++ Source/ASDisplayNode.mm | 6 ++++++ Source/ASTableNode.mm | 3 +++ Source/ASViewController.mm | 3 +++ Source/Private/_ASPendingState.mm | 3 +++ 6 files changed, 30 insertions(+) diff --git a/Source/ASCollectionNode.mm b/Source/ASCollectionNode.mm index cd533418a..5141e4efd 100644 --- a/Source/ASCollectionNode.mm +++ b/Source/ASCollectionNode.mm @@ -883,10 +883,13 @@ - (void)waitUntilAllUpdatesAreProcessed } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)waitUntilAllUpdatesAreCommitted { [self waitUntilAllUpdatesAreProcessed]; } +#pragma clang diagnostic pop - (void)reloadDataWithCompletion:(void (^)())completion { @@ -917,6 +920,8 @@ - (void)relayoutItems } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)beginUpdates { ASDisplayNodeAssertMainThread(); @@ -937,6 +942,7 @@ - (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion [self.view endUpdatesAnimated:animated completion:completion]; } } +#pragma clang diagnostic pop - (void)invalidateFlowLayoutDelegateMetrics { ASDisplayNodeAssertMainThread(); diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 06ff05637..2477a10f9 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -340,6 +340,8 @@ - (void)dealloc #pragma mark - #pragma mark Overrides. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" /** * This method is not available to be called by the public i.e. * it should only be called by UICollectionView itself. UICollectionView @@ -358,6 +360,7 @@ - (void)reloadData } completion:nil]; } } +#pragma clang diagnostic pop - (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated { @@ -656,6 +659,8 @@ - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)range return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)setZeroContentInsets:(BOOL)zeroContentInsets { _zeroContentInsets = zeroContentInsets; @@ -665,6 +670,7 @@ - (BOOL)zeroContentInsets { return _zeroContentInsets; } +#pragma clang diagnostic pop /// Uses latest size range from data source and -layoutThatFits:. - (CGSize)sizeForElement:(ASCollectionElement *)element @@ -693,6 +699,8 @@ - (CGSize)sizeForElement:(ASCollectionElement *)element } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { ASDisplayNodeAssertMainThread(); @@ -700,6 +708,7 @@ - (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath ASCollectionElement *e = [_dataController.visibleMap elementForItemAtIndexPath:indexPath]; return [self sizeForElement:e]; } +#pragma clang diagnostic pop - (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath { diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index a9a118f85..a67450f66 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -1867,7 +1867,10 @@ - (void)didDisplayAsyncLayer:(_ASDisplayLayer *)layer [self displayDidFinish]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)displayWillStart {} +#pragma clang diagnostic pop - (void)displayWillStartAsynchronously:(BOOL)asynchronously { ASDisplayNodeAssertMainThread(); @@ -3841,10 +3844,13 @@ + (void)setSuppressesInvalidCollectionUpdateExceptions:(BOOL)suppresses suppressesInvalidCollectionUpdateExceptions.store(suppresses); } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" + (BOOL)suppressesInvalidCollectionUpdateExceptions { return suppressesInvalidCollectionUpdateExceptions.load(); } +#pragma clang diagnostic pop - (NSString *)displayNodeRecursiveDescription { diff --git a/Source/ASTableNode.mm b/Source/ASTableNode.mm index 6b18aa4eb..583ac2673 100644 --- a/Source/ASTableNode.mm +++ b/Source/ASTableNode.mm @@ -847,10 +847,13 @@ - (void)waitUntilAllUpdatesAreProcessed } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)waitUntilAllUpdatesAreCommitted { [self waitUntilAllUpdatesAreProcessed]; } +#pragma clang diagnostic pop #pragma mark - Debugging (Private) diff --git a/Source/ASViewController.mm b/Source/ASViewController.mm index 3fb5a79d7..d27f47238 100644 --- a/Source/ASViewController.mm +++ b/Source/ASViewController.mm @@ -344,6 +344,8 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection [self propagateNewTraitCollection:traitCollection]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; @@ -352,5 +354,6 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO traitCollection.containerSize = self.view.bounds.size; [self propagateNewTraitCollection:traitCollection]; } +#pragma clang diagnostic pop @end diff --git a/Source/Private/_ASPendingState.mm b/Source/Private/_ASPendingState.mm index a38185e00..784d43550 100644 --- a/Source/Private/_ASPendingState.mm +++ b/Source/Private/_ASPendingState.mm @@ -777,6 +777,8 @@ - (void)setAccessibilityNavigationStyle:(UIAccessibilityNavigationStyle)newAcces accessibilityNavigationStyle = newAccessibilityNavigationStyle; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (NSArray *)accessibilityHeaderElements { return accessibilityHeaderElements; @@ -789,6 +791,7 @@ - (void)setAccessibilityHeaderElements:(NSArray *)newAccessibilityHeaderElements accessibilityHeaderElements = [newAccessibilityHeaderElements copy]; } } +#pragma clang diagnostic pop - (CGPoint)accessibilityActivationPoint {