Skip to content

Commit

Permalink
restaged release
Browse files Browse the repository at this point in the history
  • Loading branch information
vsanthanam committed May 18, 2018
1 parent 12e4ef4 commit 340dd4a
Show file tree
Hide file tree
Showing 8 changed files with 413 additions and 0 deletions.
1 change: 1 addition & 0 deletions Release/VSAlert.framework/Headers
6 changes: 6 additions & 0 deletions Release/VSAlert.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module VSAlert {
umbrella header "VSAlert.h"

export *
module * { export * }
}
1 change: 1 addition & 0 deletions Release/VSAlert.framework/VSAlert
15 changes: 15 additions & 0 deletions Release/VSAlert.framework/Versions/A/Headers/VSAlert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// VSAlert.h
// VSAlert
//
// Created by Varun Santhanam on 10/8/17.
//

#import <Foundation/Foundation.h>

/**
Umbrella Header
*/

#import <VSAlert/VSAlertController.h>
#import <VSAlert/VSAlertAction.h>
108 changes: 108 additions & 0 deletions Release/VSAlert.framework/Versions/A/Headers/VSAlertAction.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
//
// VSAlertAction.h
// VSAlertController
//
// Created by Varun Santhanam on 10/8/17.
//

@import UIKit;

/**
An enumeration for the kinds of actions that can be created
- VSAlertActionStyleDefault: A normal action
- VSAlertActionStyleCancel: An action that indicates to the user that the current process wil be cancelled
- VSAlertActionStyleDestructive: An action indicates to the user that an irreversible process is about to happen.
*/
typedef NS_ENUM(NSInteger, VSAlertActionStyle) {

/**
A normal action
*/
VSAlertActionStyleDefault,

/**
An action that indicates to the user that the current process wil be cancelled
*/
VSAlertActionStyleCancel,

/**
An action indicates to the user that an irreversible process is about to happen.
*/
VSAlertActionStyleDestructive

};

/**
VSAlertAction is a specialized subclass of UIButton that is used to populate and provide interactive controls to an instance of VSAlertController.
*/
@interface VSAlertAction : UIButton<UIAppearance>

/**
@name Creating Actions
*/

/**
A factory method to create an instance of UIAlertAction. This is the prefered way to create alert actions.
@param title The title of the action
@param style The style of the action
@param action The block to be executed when the user interacts with the action, but before the alert is dismissed
@return The instantiaed action
*/
+ (nullable instancetype)alertActionWithTitle:(nonnull NSString *)title style:(VSAlertActionStyle)style action:(void (^_Nullable)(VSAlertAction * _Nonnull action))action;

/**
Create an instance of UIAlertAction
@param title The title of the action
@param style The style of the action
@param action The block to be executed when the user interacts with the action, but before the alert is dismissed
@return The instantiaed action
*/
- (nullable instancetype)initWithTitle:(nonnull NSString *)title style:(VSAlertActionStyle)style action:(void (^_Nullable)(VSAlertAction *_Nonnull))action NS_DESIGNATED_INITIALIZER;

/**
@name Configuring Action Appearance
*/

/**
The color of the title text used in non-desctructive actions
*/
@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *actionTextColor UI_APPEARANCE_SELECTOR;

/**
The color of the title text used in destructive actions
*/
@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIColor *destructiveActionTextColor UI_APPEARANCE_SELECTOR;

/**
The font of the title used in non-cancel actions
*/
@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIFont *actionTextFont UI_APPEARANCE_SELECTOR;

/**
The font of the title used in cancel actions
*/
@property (NS_NONATOMIC_IOSONLY, strong, nonnull) UIFont *cancelActionTextFont UI_APPEARANCE_SELECTOR;

/**
@name Interacting with Actions
*/

/**
The title of the alert
*/
@property (NS_NONATOMIC_IOSONLY, copy, readonly, nullable) NSString *alertTitle;

/**
The display style of the alert
*/
@property (NS_NONATOMIC_IOSONLY, assign, readonly) VSAlertActionStyle style;

/**
The block that will be executed when the user interacts with the action. The block is called on the main thread always, and begins executed before the alert is dismissed
*/
@property (NS_NONATOMIC_IOSONLY, copy, readonly, nullable) void (^action)(VSAlertAction * _Nonnull action);

@end
Loading

0 comments on commit 340dd4a

Please sign in to comment.