From e0b124703d8100e3d0162b5d96b5c7dd3273891b Mon Sep 17 00:00:00 2001 From: Grigorii Lutkov Date: Fri, 6 Sep 2024 23:04:53 +0300 Subject: [PATCH] feat: add missing UIAppearance delegate methods, update old ones (#90) --- LGAlertView/LGAlertView.m | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/LGAlertView/LGAlertView.m b/LGAlertView/LGAlertView.m index 29ca941..1fd70c0 100644 --- a/LGAlertView/LGAlertView.m +++ b/LGAlertView/LGAlertView.m @@ -1114,23 +1114,31 @@ - (void)dealloc { #pragma mark - UIAppearance -+ (instancetype)appearance { ++ (nonnull instancetype)appearance { return [self sharedAlertViewForAppearance]; } -+ (instancetype)appearanceWhenContainedIn:(Class)ContainerClass, ... { ++ (nonnull instancetype)appearanceWhenContainedIn:(Class)ContainerClass, ... { return [self sharedAlertViewForAppearance]; } -+ (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait { ++ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait { return [self sharedAlertViewForAppearance]; } -+ (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait whenContainedIn:(Class)ContainerClass, ... { ++ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedIn:(Class)ContainerClass, ... { return [self sharedAlertViewForAppearance]; } -+ (instancetype)sharedAlertViewForAppearance { ++ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedInInstancesOfClasses:(nonnull NSArray> *)containerTypes { + return [self sharedAlertViewForAppearance]; +} + ++ (nonnull instancetype)appearanceWhenContainedInInstancesOfClasses:(nonnull NSArray> *)containerTypes { + return [self sharedAlertViewForAppearance]; +} + ++ (nonnull instancetype)sharedAlertViewForAppearance { static LGAlertView *alertView; static dispatch_once_t onceToken;