Skip to content

A drop-in replacement for UIAlertView that is more customisable and skinnable

License

Notifications You must be signed in to change notification settings

alexanderjarvis/PXAlertView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alex Jarvis
Nov 1, 2015
f2635c0 · Nov 1, 2015
Nov 1, 2015
Nov 1, 2015
Nov 1, 2015
Nov 1, 2015
Oct 9, 2013
Sep 30, 2013
Oct 9, 2013
Sep 14, 2014
Sep 24, 2014
Oct 9, 2013

Repository files navigation

PXAlertView

PXAlertView is a UIAlertView replacement similar to the style in iOS 7 but with a block based API and the ability to customise the styling and add custom views.

Preview

Demo Animation

Features

  • Simple block syntax instead of delegates
  • Animations that match UIAlertView in iOS 7
  • Fully customisable
  • Add your own UIView beneath the title

Installation

Add the following to your CocoaPods Podfile

pod 'PXAlertView', '~> 0.1.0'

or clone as a git submodule,

or just copy PXAlertView.h and .m into your project.

Usage

See PXAlertView.h for the complete API.

An Example

[PXAlertView showAlertWithTitle:@"The Matrix"
                        message:@"Pick the Red pill, or the blue pill"
                    cancelTitle:@"Blue"
                     otherTitle:@"Red"
                     completion:^(BOOL cancelled, NSInteger buttonIndex) {
                         if (cancelled) {
                             NSLog(@"Cancel (Blue) button pressed");
                         } else {
                             NSLog(@"Other (Red) button pressed");
                         }
                     }];

TODO

  • Add style that matches iOS 7 exactly
  • Ability to dynamically specify the styling of AlertView: default/dark

License

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

About

A drop-in replacement for UIAlertView that is more customisable and skinnable

Resources

License

Stars

Watchers

Forks

Packages

No packages published