Pradeepkn / PKCustomAlertView

PKCustomAlertView is a custom alert view. With the help of it user can customise according to there needs by modifying view model properties.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PKCustomAlertView

CI Status Version License Platform

Usage

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

Requirements

Installation

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

pod "PKCustomAlertView"
#import <PKCustomAlertView/PKAlertViewController.h>

Custom Alert sample code

    PKAlertModel *alertModel = [[PKAlertModel alloc] init];
    alertModel.alertTitle = @"Title";
    alertModel.alertMessageBody = @"Displaying custom alert!";
    alertModel.kAlertMarginOffSet = 20.0f;
    alertModel.buttonsArray = [NSMutableArray arrayWithObjects:@"Cancel", @"OK", nil];
    //    alertModel.alertType = kPKSuggestion;
    [[PKAlertViewController sharedInstance] displayAlertViewOnView:self.view withModel:alertModel andCallBack:^(id sender) {
        ;
    }];

Custom Table Alert sample code

    PKAlertModel *alertModel = [[PKAlertModel alloc] init];
    alertModel.alertTableEntries = [NSMutableArray arrayWithObjects:@"iOS",@"Android", @"Blackberry", @"Windows", nil];
    alertModel.alertTableImages = [NSMutableArray arrayWithObjects:[UIImage imageNamed:@"ios"], [UIImage imageNamed:@"android"],     [UIImage imageNamed:@"blackberry"],[UIImage imageNamed:@"windows"], nil];
    alertModel.shouldDisplayPreviousSelectedIndex = YES;
    alertModel.kAlertPreviousSelectedIndex = 0;
    alertModel.alertCellAccesoryImage = [UIImage imageNamed:@"tick"];
    [[PKAlertViewController sharedInstance] showAlertTableViewOn:self.view withModel:alertModel onCompletion:^(id sender) {
        ;
    }];

PKCustomAlertView can be customised according to user needs. User can chanage color, font, margins, Butttons etc., by modifying PKAlertModel properties.

alt tag alt tag alt tag alt tag

Author

pradeep, pradeep.nagendra@tarento.com

License

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

About

PKCustomAlertView is a custom alert view. With the help of it user can customise according to there needs by modifying view model properties.

License:Other


Languages

Language:Objective-C 64.1%Language:Shell 31.9%Language:Ruby 3.9%