LGAlertView Versions Save

Customizable implementation of UIAlertViewController, UIAlertView and UIActionSheet. All in one. You can customize every detail. Make AlertView of your dream! :)

2.4.0

6 years ago
  • Now you can use progressLabelText for alertView with activityIndicator as well as for alertView with progressView:
alertView.progressLabelText = @"Some text"
  • Now you can set progress using @property:
alertView.progress = 50.0;

2.3.2

6 years ago
  • Refactoring
  • Optimizations
  • Now you can make AlertView background blurred
  • Add new delegates, blocks and notifications to add custom animations:
# Delegates
- (void)showAnimationsForAlertView:(nonnull LGAlertView *)alertView duration:(NSTimeInterval)duration;
- (void)dismissAnimationsForAlertView:(nonnull LGAlertView *)alertView duration:(NSTimeInterval)duration;

# Blocks
void(^ _Nullable showAnimationsBlock)(LGAlertView * _Nonnull alertView, NSTimeInterval duration);
void(^ _Nullable dismissAnimationsBlock)(LGAlertView * _Nonnull alertView, NSTimeInterval duration);

# Notifications
LGAlertViewShowAnimationsNotification;
LGAlertViewDismissAnimationsNotification;

2.3.1

7 years ago

Fix bugs with status bar and keyboard

2.3.0

7 years ago
  • Fix bugs
  • Refactoring
  • Some deprecations in delegate protocol:
// BEFORE
- (void)alertView:(nonnull LGAlertView *)alertView buttonPressedWithTitle:(nullable NSString *)title index:(NSUInteger)index;
- (void)alertViewDestructiveButtonPressed:(nonnull LGAlertView *)alertView;

// NOW
- (void)alertView:(nonnull LGAlertView *)alertView clickedButtonAtIndex:(NSUInteger)index title:(nullable NSString *)title;
- (void)alertViewDestructed:(nonnull LGAlertView *)alertView;
  • Add new collbacks, delegate methods and notifications:
// Notifications
extern NSString *_Nonnull const LGAlertViewDidDismissAfterActionNotification;
extern NSString *_Nonnull const LGAlertViewDidDismissAfterCancelNotification;
extern NSString *_Nonnull const LGAlertViewDidDismissAfterDestructiveNotification;

// Callbacks
@property (copy, nonatomic) LGAlertViewActionHandler didDismissAfterActionHandler;
@property (copy, nonatomic) LGAlertViewHandler didDismissAfterCancelHandler;
@property (copy, nonatomic) LGAlertViewHandler didDismissAfterDestructiveHandler;

// Delegate methods
- (void)alertView:(nonnull LGAlertView *)alertView didDismissAfterClickedButtonAtIndex:(NSUInteger)index title:(nullable NSString *)title;
- (void)alertViewDidDismissAfterCancelled:(nonnull LGAlertView *)alertView;
- (void)alertViewDidDismissAfterDestructed:(nonnull LGAlertView *)alertView;
  • Add new property (when LGAlertView is dismissing after some action):
/** Default is YES */
@property (assign, nonatomic) BOOL shouldDismissAnimated UI_APPEARANCE_SELECTOR;
  • Removed class method to get all existing LGAlertViews
+ (NSArray *)getAlertViewsArray;

2.2.0

7 years ago
  • Refactoring
  • Fix bugs
  • Add new properties for setup text fields:
/** Default is [UIColor colorWithWhite:0.97 alpha:1.0] */
@property (strong, nonatomic, nullable) UIColor *textFieldsBackgroundColor UI_APPEARANCE_SELECTOR;
/** Default is UIColor.blackColor */
@property (strong, nonatomic, nullable) UIColor *textFieldsTextColor UI_APPEARANCE_SELECTOR;
/** Default is [UIFont systemFontOfSize:16.0] */
@property (strong, nonatomic, nullable) UIFont *textFieldsFont UI_APPEARANCE_SELECTOR;
/** Default is NSTextAlignmentLeft */
@property (assign, nonatomic) NSTextAlignment textFieldsTextAlignment UI_APPEARANCE_SELECTOR;
/** Default is NO */
@property (assign, nonatomic) BOOL textFieldsClearsOnBeginEditing UI_APPEARANCE_SELECTOR;
/** Default is NO */
@property (assign, nonatomic) BOOL textFieldsAdjustsFontSizeToFitWidth UI_APPEARANCE_SELECTOR;
/** Default is 12.0 */
@property (assign, nonatomic) CGFloat textFieldsMinimumFontSize UI_APPEARANCE_SELECTOR;
/** Default is UITextFieldViewModeAlways */
@property (assign, nonatomic) UITextFieldViewMode textFieldsClearButtonMode UI_APPEARANCE_SELECTOR;
  • Now instead of using class methods to set global properties, you need to use appearance:
# BEFORE
LGAlertView.tintColor = [UIColor greenColor];

# NOW
[LGAlertView appearance].tintColor = UIColor.greenColor;

2.1.1

7 years ago

Fix bugs

2.1.0

7 years ago
  • Carthage framework was renamed: LGAlertViewFramework -> LGAlertView. You need to re-add framework file.
  • Refactored to support new swift features like nullable and nonnull objects.
  • Minimal iOS version increased to 8.0
  • Fixed bugs with autolayouts
  • Renamed notifications:
LGAlertViewWillShowNotification
LGAlertViewDidShowNotification

LGAlertViewWillDismissNotification
LGAlertViewDidDismissNotification

LGAlertViewActionNotification
LGAlertViewCancelNotification
LGAlertViewDestructiveNotification
  • Added new methods:
- (void)showAnimated;
- (void)show;

- (void)dismissAnimated;
- (void)dismiss;

- (void)transitionToAlertView:(nonnull LGAlertView *)alertView;
  • Renamed method:
// Deprecated
- (void)setButtonAtIndex:(NSUInteger)index enabled:(BOOL)enabled;

// New
- (void)setButtonEnabled:(BOOL)enabled atIndex:(NSUInteger)index;
  • Added ability to show icons on buttons
@property (copy, nonatomic, nullable) NSArray *buttonsIconImages;
@property (copy, nonatomic, nullable) NSArray *buttonsIconImagesHighlighted;
@property (copy, nonatomic, nullable) NSArray *buttonsIconImagesDisabled;
@property (assign, nonatomic) LGAlertViewButtonIconPosition buttonsIconPosition;

@property (strong, nonatomic, nullable) UIImage *cancelButtonIconImage;
@property (strong, nonatomic, nullable) UIImage *cancelButtonIconImageHighlighted;
@property (strong, nonatomic, nullable) UIImage *cancelButtonIconImageDisabled;
@property (assign, nonatomic) LGAlertViewButtonIconPosition cancelButtonIconPosition;

@property (strong, nonatomic, nullable) UIImage *destructiveButtonIconImage;
@property (strong, nonatomic, nullable) UIImage *destructiveButtonIconImageHighlighted;
@property (strong, nonatomic, nullable) UIImage *destructiveButtonIconImageDisabled;
@property (assign, nonatomic) LGAlertViewButtonIconPosition destructiveButtonIconPosition;
  • Change class methods to class properties:
// Before
[LGAlertView setTintColor:UIColor.greenColor];

// Now
LGAlertView.tintColor = UIColor.greenColor;
  • Add ability to make cover view blurred

2.0.13

8 years ago

Fixed bugs

2.0.12

8 years ago

Now you can:

  • Dismiss or not alert view on user action (default is YES)
    • alertView.dismissOnAction = NO;
  • Setup all properties globally for all instances of LGAlertView
    • [LGAlertView setTintColor:[UIColor greenColor]];
    • [LGAlertView setColorful:NO];
    • [LGAlertView setCoverColor:[UIColor colorWithWhite:1.f alpha:0.8]];
    • [LGAlertView setBackgroundColor:[UIColor grayColor]];
    • . . .

2.0.11

8 years ago

Fixed bugs