diff --git a/Release/VSAlert.framework/Versions/A/Headers/VSAlertController.h b/Release/VSAlert.framework/Versions/A/Headers/VSAlertController.h index 1058477..4611142 100644 --- a/Release/VSAlert.framework/Versions/A/Headers/VSAlertController.h +++ b/Release/VSAlert.framework/Versions/A/Headers/VSAlertController.h @@ -117,7 +117,7 @@ typedef NS_ENUM(NSInteger, VSAlertControllerAnimationStyle) { /** VSAlertController is a drop-in replacement for UIAlertController with more features. It is created using the +alertControllerWithTitle:description:image:style: class method, and configured using instances of VSAlertAction. You can add text fields by calling -addTextField: on an instance of VSAlertController. Instantiate the controller, add your actions and textfieds. and any other configuration you might need. Present the controller modally using UIViewController's -presentViewController:animated:completion: method. VSAlertController respects the animation paramater of this call, and you configure the animation in question by setting your instances animationStyle property before presentation. You can also change this property in the handler of an action to use a different animation on dismissal. */ -@interface VSAlertController : UIViewController +@interface VSAlertController : UIViewController /** @name Creating Alerts @@ -240,28 +240,4 @@ typedef NS_ENUM(NSInteger, VSAlertControllerAnimationStyle) { */ @property (NS_NONATOMIC_IOSONLY, strong, readonly, nullable) UIImage *image; -/** - @name Customizing the Class Globally - */ - -/** - Default title text color. Affects all instances instantiated after this change. - */ -@property (NS_NONATOMIC_IOSONLY, class, strong, nullable) UIColor *defaultTitleTextColor; - -/** - Default description text color. Affects all instances instantiated after this change. - */ -@property (NS_NONATOMIC_IOSONLY, class, strong, nullable) UIColor *defaultMessageTextColor; - -/** - Default title text font. Affects all instance instantiated after this change. - */ -@property (NS_NONATOMIC_IOSONLY, class, strong, nullable) UIFont *defaultTitleTextFont; - -/** - Default description text font. Affects all instances instantiated after this change. - */ -@property (NS_NONATOMIC_IOSONLY, class, strong, nullable) UIFont *defaultMessageTextFont; - @end diff --git a/Release/VSAlert.framework/Versions/A/VSAlert b/Release/VSAlert.framework/Versions/A/VSAlert index 78bb20a..07d6df4 100644 Binary files a/Release/VSAlert.framework/Versions/A/VSAlert and b/Release/VSAlert.framework/Versions/A/VSAlert differ diff --git a/VSAlert.xcodeproj/project.pbxproj b/VSAlert.xcodeproj/project.pbxproj index 18c7a78..faaadb9 100644 --- a/VSAlert.xcodeproj/project.pbxproj +++ b/VSAlert.xcodeproj/project.pbxproj @@ -476,7 +476,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-fembed-bitcode"; @@ -535,7 +535,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = "-fembed-bitcode"; OTHER_LDFLAGS = "-ObjC"; diff --git a/VSAlert/VSAlertController.m b/VSAlert/VSAlertController.m index d2c6117..80d1028 100644 --- a/VSAlert/VSAlertController.m +++ b/VSAlert/VSAlertController.m @@ -293,28 +293,44 @@ - (CGFloat)alertStackViewHeight { + (instancetype)appearance { - return [VSAlertControllerAppearanceProxy appearance]; + return (VSAlertController *)[VSAlertControllerAppearanceProxy appearance]; } + (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait { - return [VSAlertControllerAppearanceProxy appearanceForTraitCollection:trait]; + return (VSAlertController *)[VSAlertControllerAppearanceProxy appearanceForTraitCollection:trait]; } + (instancetype)appearanceForTraitCollection:(UITraitCollection *)trait whenContainedInInstancesOfClasses:(NSArray> *)containerTypes { - return [VSAlertControllerAppearanceProxy appearanceForTraitCollection:trait whenContainedInInstancesOfClasses:containerTypes]; + return (VSAlertController *)[VSAlertControllerAppearanceProxy appearanceForTraitCollection:trait whenContainedInInstancesOfClasses:containerTypes]; } + (instancetype)appearanceWhenContainedInInstancesOfClasses:(NSArray> *)containerTypes { - return [VSAlertControllerAppearanceProxy appearanceWhenContainedInInstancesOfClasses:containerTypes]; + return (VSAlertController *)[VSAlertControllerAppearanceProxy appearanceWhenContainedInInstancesOfClasses:containerTypes]; } ++ (nonnull instancetype)appearanceForTraitCollection:(nonnull UITraitCollection *)trait whenContainedIn:(nullable Class)ContainerClass, ... { + + return nil; + +} + + ++ (nonnull instancetype)appearanceWhenContainedIn:(nullable Class)ContainerClass, ... { + + return nil; + +} + + + + #pragma mark - UIViewControllerTransitioningDelegate - (id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { @@ -435,7 +451,7 @@ - (void)_setUpAlertController { _presentAnimator = [[VSAlertControllerTransitionAnimator alloc] init]; _dismissAnimator = [[VSAlertControllerTransitionAnimator alloc] init]; -// Set up propertie without accessors for use with UIAppearance + // Set up propertie without accessors for use with UIAppearance _alertTitleTextColor = [VSAlertController appearance].alertTitleTextColor ? [VSAlertController appearance].alertTitleTextColor : [UIColor blackColor]; _alertTitleTextFont = [VSAlertController appearance].alertTitleTextFont ? [VSAlertController appearance].alertTitleTextFont : [UIFont systemFontOfSize:17.0f weight:UIFontWeightSemibold]; _alertMessageTextColor = [VSAlertController appearance].alertMessageTextColor ? [VSAlertController appearance].alertMessageTextColor : [UIColor blackColor]; @@ -900,7 +916,7 @@ - (void)_processDefaultActions { for (VSAlertAction *alertAction in _defaultActions) { [self.alertActionStackView addArrangedSubview:alertAction]; - + [alertAction addTarget:self action:@selector(_tappedAction:) forControlEvents:UIControlEventTouchUpInside]; @@ -968,7 +984,7 @@ - (void)_tappedAction:(VSAlertAction *)sender { if ([self.delegate respondsToSelector:@selector(alertController:didSelectAction:)]) { dispatch_async(dispatch_get_main_queue(), ^{ - + [self.delegate alertController:self didSelectAction:sender];