Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A drop-in replacement for UIAlertView that is more customisable and skinnable
branch: master

This branch is 93 commits behind alexanderjarvis:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Classes
PXAlertViewDemo.xcodeproj
PXAlertViewDemo
PXAlertViewDemoTests
.gitignore
ExampleImage.png
LICENSE
PXAlertView.podspec
README.md
animation.gif

README.md

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.0.2'

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) {
                         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
  • Ability to add more than two buttons (was not an initial requirement)
  • Allow usage using the same API methods as UIAlertView and delegate.

License

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

Something went wrong with that request. Please try again.