Latest 0.1.4
Homepage https://github.com/SunnyXG/AlertHelper
License MIT
Platforms ios 8.0
Dependencies Masonry
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

How to use

You should import header first

#import "AlertHelper.h"

If you want alert some text for tips, pls used

AlertText(self.view).title(@"这是一条提示信息").show();   // it will hide delay 1.5s, replace self.view to your target source view.

If you want alert and need operate some thing, pls used

AlertView(self.view).title(@"这是一条提示标题").message(@"这是一条提示信息").cancelButton(@"取消").confirmButton(@"确定").cancelHandler(^{ 
}).confirmHandler(^{   
}).show();

If you want do some thing when dismiss completion, pls used

AlertText(self.view).title(@"这是一条提示信息").show().dismissHandler(^{
// do some thing at this.
});

If you want alert in the window, pls used

AlertTextInWindow().title(@"").show();

or

AlertViewInWindow().title(@"").message(@"").cancelButton(@"取消").confirmButton(@"确定").cancelHandler(^{ 
}).confirmHandler(^{   
}).show();

If you want custom configuration, pls used

AlertText(self.view).title(@"").font([UIFont ..]).titleColor([UIColor ..]).show();  // it have some comtus set, pls use it.

also you can set global configuration like this

// declare the HelperConfigurationHandler object.
void CustomConfigurationForAlertHelper(ZZAlertHelper *alertHelper);

@interface ExampleClass()
@end

@implementation ExampleClass

 // call this function at app launch<AppDelegate.m> or at the global app preference.   
- (void)setupAppPerference
{
    // call the function to set the HelperConfigurationHandler object at AlertHelper.m. 
   SetupZZAlertHelperConfiguration(CustomConfigurationForAlertHelper);
}

//  setup custom config at here.
void CustomConfigurationForAlertHelper(ZZAlertHelper *alertHelper)
{
    alertHelper.titleLabelTextColor = [UIColor blackColor];
    alertHelper.textFont = [UIFont boldSystemFontOfSize:17];
}

@end    

Installation

AlertHelper is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'AlertHelper'

Author

SunnyXG, [email protected], if you have any issues and suggest, please email to me, thanks.

License

AlertHelper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AlertHelper",
    "version": "0.1.4",
    "summary": "A custom alert view for ios.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/SunnyXG/AlertHelper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "SunnyXG": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SunnyXG/AlertHelper.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AlertHelper/Classes/*.{h,m}",
    "public_header_files": "AlertHelper/Classes/*.h",
    "frameworks": "UIKit",
    "dependencies": {
        "Masonry": [
            "~> 1.1.0"
        ]
    }
}

Pin It on Pinterest

Share This