To run the example project, clone the repo, and run pod install
from the Example directory first.
PKCustomAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PKCustomAlertView"
#import <PKCustomAlertView/PKAlertViewController.h>
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) {
;
}];
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.
pradeep, pradeep.nagendra@tarento.com
PKCustomAlertView is available under the MIT license. See the LICENSE file for more info.