Skip to content

Commit

Permalink
feat: add missing UIAppearance delegate methods, update old ones (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
Friend-LGA authored Sep 6, 2024
1 parent ef38b91 commit e0b1247
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions LGAlertView/LGAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1114,23 +1114,31 @@ - (void)dealloc {

#pragma mark - UIAppearance

+ (instancetype)appearance {
+ (nonnull instancetype)appearance {
return [self sharedAlertViewForAppearance];
}

+ (instancetype)appearanceWhenContainedIn:(Class<UIAppearanceContainer>)ContainerClass, ... {
+ (nonnull instancetype)appearanceWhenContainedIn:(Class<UIAppearanceContainer>)ContainerClass, ... {
return [self sharedAlertViewForAppearance];
}

+ (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait {
+ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait {
return [self sharedAlertViewForAppearance];
}

+ (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait whenContainedIn:(Class<UIAppearanceContainer>)ContainerClass, ... {
+ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedIn:(Class<UIAppearanceContainer>)ContainerClass, ... {
return [self sharedAlertViewForAppearance];
}

+ (instancetype)sharedAlertViewForAppearance {
+ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedInInstancesOfClasses:(nonnull NSArray<Class<UIAppearanceContainer>> *)containerTypes {
return [self sharedAlertViewForAppearance];
}

+ (nonnull instancetype)appearanceWhenContainedInInstancesOfClasses:(nonnull NSArray<Class<UIAppearanceContainer>> *)containerTypes {
return [self sharedAlertViewForAppearance];
}

+ (nonnull instancetype)sharedAlertViewForAppearance {
static LGAlertView *alertView;
static dispatch_once_t onceToken;

Expand Down

0 comments on commit e0b1247

Please sign in to comment.