From acfb81d339b9cec3837ec3a8c6389c47cb61a9a9 Mon Sep 17 00:00:00 2001 From: Grigory Lutkov Date: Thu, 11 May 2017 21:37:20 +0300 Subject: [PATCH] Update README.md --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bf58a1f..724f1aa 100644 --- a/README.md +++ b/README.md @@ -10,26 +10,40 @@ You can customize every detail. Make AlertView of your dream! :) ## Preview -### Default Alert View Style +### Default Alert View - - - - + + + + -### Default Action Sheet Style +### Default Action Sheet - - - + + + -### Custom Alert View Styles +### Blurred Alert View - + -### Custom Action Sheet Styles + - +### Blurred Action Sheet + + + + + +### Custom Alert View + + + +### Custom Action Sheet + + + +> Screenshots above are just few examples that you can achieve, you are free to create any other style ## Installation @@ -387,6 +401,9 @@ To handle actions you can use blocks, delegate or notifications: - (void)alertView:(nonnull LGAlertView *)alertView didDismissAfterClickedButtonAtIndex:(NSUInteger)index title:(nullable NSString *)title; - (void)alertViewDidDismissAfterCancelled:(nonnull LGAlertView *)alertView; - (void)alertViewDidDismissAfterDestructed:(nonnull LGAlertView *)alertView; + +- (void)showAnimationsForAlertView:(nonnull LGAlertView *)alertView duration:(NSTimeInterval)duration; +- (void)dismissAnimationsForAlertView:(nonnull LGAlertView *)alertView duration:(NSTimeInterval)duration; ``` ##### Swift @@ -407,6 +424,9 @@ optional public func alertViewDestructed(_ alertView: LGAlertView) optional public func alertView(_ alertView: LGAlertView, didDismissAfterClickedButtonAtIndex index: UInt, title: String?) optional public func alertViewDidDismissAfterCancelled(_ alertView: LGAlertView) optional public func alertViewDidDismissAfterDestructed(_ alertView: LGAlertView) + +optional public func showAnimationsForAlertView(_ alertView: LGAlertView, duration: NSTimeInterval) +optional public func dismissAnimationsForAlertView(_ alertView: LGAlertView, duration: NSTimeInterval) ``` #### Blocks @@ -429,6 +449,9 @@ void(^ _Nullable destructiveHandler)(LGAlertView * _Nonnull alertView); void(^ _Nullable didDismissAfterActionHandler)(LGAlertView * _Nonnull alertView, NSUInteger index, NSString * _Nullable title); void(^ _Nullable didDismissAfterCancelHandler)(LGAlertView * _Nonnull alertView); void(^ _Nullable didDismissAfterDestructiveHandler)(LGAlertView * _Nonnull alertView); + +void(^ _Nullable showAnimationsBlock)(LGAlertView * _Nonnull alertView, NSTimeInterval duration); +void(^ _Nullable dismissAnimationsBlock)(LGAlertView * _Nonnull alertView, NSTimeInterval duration); ``` ##### Swift @@ -447,6 +470,9 @@ open var destructiveHandler: ((alertView: LGAlertView) -> Swift.Void)? open var didDismissAfterActionHandler: ((alertView: LGAlertView, index: NSUInteger, title: NSString) -> Swift.Void)? open var didDismissAfterCancelHandler: ((alertView: LGAlertView) -> Swift.Void)? open var didDismissAfterDestructiveHandler: ((alertView: LGAlertView) -> Swift.Void)? + +open var showAnimationsBlock: ((alertView: LGAlertView, duration: NSTimeInterval) -> Swift.Void)? +open var dismissAnimationsBlock: ((alertView: LGAlertView, duration: NSTimeInterval) -> Swift.Void)? ``` #### Notifications @@ -465,6 +491,9 @@ LGAlertViewDestructiveNotification LGAlertViewDidDismissAfterActionNotification; LGAlertViewDidDismissAfterCancelNotification; LGAlertViewDidDismissAfterDestructiveNotification; + +LGAlertViewShowAnimationsNotification; +LGAlertViewDismissAnimationsNotification; ``` ### More