Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated implementations warning #1306

Merged
merged 1 commit into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Source/ASCollectionNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -917,6 +920,8 @@ - (void)relayoutItems
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)beginUpdates
{
ASDisplayNodeAssertMainThread();
Expand All @@ -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();
Expand Down
9 changes: 9 additions & 0 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -358,6 +360,7 @@ - (void)reloadData
} completion:nil];
}
}
#pragma clang diagnostic pop

- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated
{
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -693,13 +699,16 @@ - (CGSize)sizeForElement:(ASCollectionElement *)element
}
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
{
ASDisplayNodeAssertMainThread();

ASCollectionElement *e = [_dataController.visibleMap elementForItemAtIndexPath:indexPath];
return [self sizeForElement:e];
}
#pragma clang diagnostic pop

- (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath
{
Expand Down
6 changes: 6 additions & 0 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions Source/ASTableNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions Source/ASViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -352,5 +354,6 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO
traitCollection.containerSize = self.view.bounds.size;
[self propagateNewTraitCollection:traitCollection];
}
#pragma clang diagnostic pop

@end
3 changes: 3 additions & 0 deletions Source/Private/_ASPendingState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ - (void)setAccessibilityNavigationStyle:(UIAccessibilityNavigationStyle)newAcces
accessibilityNavigationStyle = newAccessibilityNavigationStyle;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (NSArray *)accessibilityHeaderElements
{
return accessibilityHeaderElements;
Expand All @@ -789,6 +791,7 @@ - (void)setAccessibilityHeaderElements:(NSArray *)newAccessibilityHeaderElements
accessibilityHeaderElements = [newAccessibilityHeaderElements copy];
}
}
#pragma clang diagnostic pop

- (CGPoint)accessibilityActivationPoint
{
Expand Down