Supresss the deprecation warning when min deployment target version set to iOS 13+ or macCatalyst
This commit is contained in:
parent
b54cdcc4bb
commit
bd33f4179d
|
@ -69,6 +69,8 @@
|
|||
#endif
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
- (SDGraphicsImageRendererFormatRange)preferredRange {
|
||||
#if SD_UIKIT
|
||||
if (@available(iOS 10.0, tvOS 10.10, *)) {
|
||||
|
@ -114,6 +116,7 @@
|
|||
_preferredRange = preferredRange;
|
||||
#endif
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
|
|
|
@ -223,7 +223,10 @@
|
|||
}
|
||||
} else {
|
||||
@try {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
extendedData = [NSKeyedArchiver archivedDataWithRootObject:extendedObject];
|
||||
#pragma clang diagnostic pop
|
||||
} @catch (NSException *exception) {
|
||||
NSLog(@"NSKeyedArchiver archive failed with exception: %@", exception);
|
||||
}
|
||||
|
@ -397,7 +400,10 @@
|
|||
}
|
||||
} else {
|
||||
@try {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
extendedObject = [NSKeyedUnarchiver unarchiveObjectWithData:extendedData];
|
||||
#pragma clang diagnostic pop
|
||||
} @catch (NSException *exception) {
|
||||
NSLog(@"NSKeyedUnarchiver unarchive failed with exception: %@", exception);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue