Coder Social home page Coder Social logo

pradeepkn / pkcustomalertview Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 300 KB

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

Objective-C 64.14% Ruby 3.94% Shell 31.91%

pkcustomalertview's Introduction

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, [email protected]

License

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

pkcustomalertview's People

Contributors

pradeepkn avatar

Stargazers

Chirag avatar  avatar Sivagami avatar  avatar wliu avatar Kavya K N avatar Subramanian avatar Tabrez avatar  avatar Bill Burgess avatar Jonas Boserup avatar

Watchers

 avatar James Cloos avatar

Forkers

iweig

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.