Latest 0.1.4
Homepage https://github.com/Tulakshana/TWAlertView
License MIT
Platforms ios 7.0
Authors

Version
License
Platform

This pod is inspired by UIAlertController. TWAlertView will automatically recognise the top most view controller to display the alert, making showing a simple alert a hazzel free task.

Usage

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
    [TWAlertView showAlert:@"Hello" message:@"What do you like to do today?" buttonsArray:[NSArray arrayWithObjects:@"Socialise",@"Code", nil] callback:^(NSError *error, int buttonIndex) {
        if (error) {
            NSLog(@"%@",error.debugDescription);
        }else{
            switch (buttonIndex) {
            case 0:
                [self socialise];
                break;
            case 1:
                [self code];
                break;
            default:
                break;
            }
        }
    }];

    return YES;
}

- (void)socialise{
    [TWAlertView showAlert:@"Warning!" message:@"Are you sure you want to compromise your valuable time?"];
}

- (void)code{
    [TWAlertView showAlert:@"Nice!" message:@"Good choice buddy"];
}

Installation

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

pod 'TWAlertView'

License

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

Todo

  • Support action sheet style

Latest podspec

{
    "name": "TWAlertView",
    "version": "0.1.4",
    "summary": "A simple pod which could be used to show an alert in your iOS app",
    "description": "This pod is inspired by UIAlertController. TWAlertView will automatically recognise the top most view controller to display the alert, making showing a simple alert a hazzel free task.",
    "homepage": "https://github.com/Tulakshana/TWAlertView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "tulakshana": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Tulakshana/TWAlertView.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "TWAlertView/Classes/**/*"
}

Pin It on Pinterest

Share This