PKCustomAlertView 0.1.1

PKCustomAlertView 0.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2015

Maintained by KNP.



  • By
  • pradeep

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"

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) {
        ;
    }];

alt tag alt tag alt tag alt tag

Author

pradeep, [email protected]

License

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