Latest 1.1.0
Homepage https://github.com/melvyndev/MLVAlertKit
License MIT
Platforms ios 7.0, requires ARC
Authors

[Platform]()
[CocoaPods]()
Carthage compatible
License
Twitter

MLVAlertKit is a customizable alert and action sheet UI framework like UIAlertController,but we changed present and dismiss animator to raise user experience , also you can customize text attributes for yourself.

[MLVAlertKit]()

Requirements

MLVAlertKit Version Minimum iOS Target Descriptions
1.0.0 iOS 8
1.1.0 iOS 7 add UITextField support

Installation

MLVAlertKit can be added to a project using CocoaPods、Cathage, One may also use source files included in the project.

CocoaPods

CocoaPods is the recommended way to add MLVAlertKit to your project.

  1. Add a pod entry for MLVAlertKit to your Podfile pod 'MLVAlertKit', '~> 1.1.0' or pod 'MLVAlertKit'
  2. Install the pod(s) by running pod install or update by running pod update
  3. Include MLVAlertKit wherever you need it with #import <MLVAlertKit/MLVAlertKit.h>.

Carthage

  1. Add MLVAlertKit to your Cartfile. e.g., github "melvyndev/MLVAlertKit" ~> 1.1.0
  2. Run carthage update
  3. Follow the rest of the standard Carthage installation instructions to add MLVAlertKit to your project.

Source files

Alternatively you can directly add the source files to your project.

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Open your project in Xcode, then drag and drop MLVAlertKit.h MLVAlertController.h MLVAlertController.m MLVAlertAnimator.h MLVAlertAnimator.m onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
  3. Include MLVAlertKit wherever you need it with #import "MLVAlertKit.h".

Usage

You can present the alert from any UIViewController like UIAlertController.

MLVAlertController *alert = [MLVAlertController alertControllerWithTitle:@"Remind !!" message:@"Support is on Github" preferredStyle:MLVAlertControllerStyleAlert];
MLVAlertAction *cancel = [MLVAlertAction actionWithTitle:@"Cancel" style:MLVAlertActionStyleCancel handler:^(MLVAlertAction * _Nonnull action) {

}];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:NULL];

Add UITextFiels using the reference that:

- (void)addTextFieldWithConfigurationHandler:(void (^ __nullable)(UITextField *textField))configurationHandler;

If you need to configure the attributes you can do this by using the MLVAlertController reference that:

+ (instancetype)alertControllerWithAttributedTitle:(nullable NSAttributedString *)title message:(nullable NSAttributedString *)message preferredStyle:(MLVAlertControllerStyle)preferredStyle;
+ (instancetype)actionWithAttributedTitle:(NSAttributedString *)title style:(MLVAlertActionStyle)style handler:(void (^ __nullable)(MLVAlertAction *action))handler;

For more examples, download MLVAlertKit and try out the iPhone example app

License

MLVAlertKit is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "MLVAlertKit",
    "version": "1.1.0",
    "summary": "MLVAlertKit is a customizable alert and action sheet UI framework",
    "homepage": "https://github.com/melvyndev/MLVAlertKit",
    "license": "MIT",
    "authors": {
        "melvyndev": "[email protected]"
    },
    "social_media_url": "http://twitter.com/melvyndev",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/melvyndev/MLVAlertKit.git",
        "tag": "1.1.0"
    },
    "source_files": "MLVAlertKit/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This