Latest 1.0.0
Homepage https://github.com/minsOne/MODropAlert
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, CoreGraphics, UIKit
Authors

I want to make dropping alert view, so I make this custom alert view library.

DropAlert

(the above gif is iphone simulator animation.)

Installation Cocoapods

as soon as..(maybe?)

How to use it

This dropAlert view is two ways(delegate or block).

  • Delegate

    MODropAlertView *alertView = [[MODropAlertView alloc]initDropAlertWithTitle:@"Alert"
                                                                    description:@"Lorem ipsum dolor sit amet"
                                                                  okButtonTitle:@"OK"
                                                              cancelButtonTitle:@"Cancel"];
    alertView.delegate = self;
    [alertView show];                                                              
  • Delegate Main methods :
    
    // default alert view
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString *)okButtonTitle;
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle cancelButtonTitle:(NSString )cancelButtonTitle;

// custom color alert view

  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle okButtonColor:(UIColor )okBtnColor;
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle cancelButtonTitle:(NSString )cancelButtonTitle okButtonColor:(UIColor )okBtnColor cancelButtonColor:(UIColor )cancelBtnColor;

  • Block

    MODropAlertView *alert = [[MODropAlertView alloc]initDropAlertWithTitle:@"Block AlertView" 
                                                            description:@"Lorem ipsum dolor sit amet."
                                                          okButtonTitle:@"OK"
                                                           successBlock:^{
                                                               NSLog(@"Success Log");
                                                           }];
    [alert show];
  • Block Main methods :
    
    // default alert view
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString *)okButtonTitle successBlock:(blk)successBlock;
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle cancelButtonTitle:(NSString )cancelButtonTitle successBlock:(blk)successBlock failureBlock:(blk)failureBlock;

// custom color alert view

  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle okButtonColor:(UIColor )okBtnColor successBlock:(blk)successBlock;
  • (instancetype)initDropAlertWithTitle:(NSString )title description:(NSString )description okButtonTitle:(NSString )okButtonTitle cancelButtonTitle:(NSString )cancelButtonTitle okButtonColor:(UIColor )okBtnColor cancelButtonColor:(UIColor )cancelBtnColor successBlock:(blk)successBlock failureBlock:(blk)failureBlock;

If you use delegate pattern, you notice action of view.

- (void)alertViewWillAppear:(MODropAlertView *)alertView;
- (void)alertViewDidAppear:(MODropAlertView *)alertView;
- (void)alertViewWilldisappear:(MODropAlertView *)alertView buttonType:(DropAlertButtonType)buttonType;
- (void)alertViewDidDisappear:(MODropAlertView *)alertView buttonType:(DropAlertButtonType)buttonType;
- (void)alertViewPressButton:(MODropAlertView *)alertView buttonType:(DropAlertButtonType)buttonType;

Latest podspec

{
    "name": "MODropAlert",
    "version": "1.0.0",
    "summary": "Dropping AlertView by Ahn JungMin",
    "description": "                   Dropping AlertView spring animation made by Ahn JungMinnn",
    "homepage": "https://github.com/minsOne/MODropAlert",
    "screenshots": "https://raw.githubusercontent.com/minsOne/MODropAlert/master/screencapture.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ahn JungMin": "[email protected]"
    },
    "social_media_url": "http://twitter.com/cancoffee7",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/minsOne/MODropAlert.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "MODropAlert",
        "MODropAlert/*.{h,m}"
    ],
    "frameworks": [
        "Foundation",
        "CoreGraphics",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This