GithubHelp home page GithubHelp logo

isabella232 / sialertview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prolificinteractive/sialertview

0.0 0.0 0.0 626 KB

An UIAlertView replacement with block syntax and fancy transition styles.

License: MIT License

Ruby 1.35% Objective-C 98.65%

sialertview's Introduction

SIAlertView

An UIAlertView replacement with block syntax and fancy transition styles. As seen in Grid Diary.

Preview

SIAlertView Screenshot

Features

  • use window to present
  • happy with rotation
  • block syntax
  • styled transitions
  • queue support
  • UIAppearance support

Installation

Cocoapods(Recommended)

  1. Add pod 'SIAlertView' to your Podfile.
  2. Run pod install

Manual

  1. Add all files under SIAlertView/SIAlertView to your project
  2. Add QuartzCore.framework to your project

Requirements

  • iOS 5.0 and greater
  • ARC

(If you are having any problems, just select your project -> Build Phases -> Compile Sources, double-click the SIAlertView and add -fobjc-arc)

Examples

Code:

SIAlertView *alertView = [[SIAlertView alloc] initWithTitle:@"SIAlertView" andMessage:@"Sumi Interactive"];

[alertView addButtonWithTitle:@"Button1"
                         type:SIAlertViewButtonTypeDefault
                      handler:^(SIAlertView *alert) {
                          NSLog(@"Button1 Clicked");
                      }];
[alertView addButtonWithTitle:@"Button2"
                         type:SIAlertViewButtonTypeDestructive
                      handler:^(SIAlertView *alert) {
                          NSLog(@"Button2 Clicked");
                      }];
[alertView addButtonWithTitle:@"Button3"
                         type:SIAlertViewButtonTypeCancel
                      handler:^(SIAlertView *alert) {
                          NSLog(@"Button3 Clicked");
                      }];

alertView.willShowHandler = ^(SIAlertView *alertView) {
    NSLog(@"%@, willShowHandler", alertView);
};
alertView.didShowHandler = ^(SIAlertView *alertView) {
    NSLog(@"%@, didShowHandler", alertView);
};
alertView.willDismissHandler = ^(SIAlertView *alertView) {
    NSLog(@"%@, willDismissHandler", alertView);
};
alertView.didDismissHandler = ^(SIAlertView *alertView) {
    NSLog(@"%@, didDismissHandler", alertView);
};

alertView.transitionStyle = SIAlertViewTransitionStyleBounce;

[alertView show];

Credits

SIAlertView was created by Sumi Interactive in the development of Grid Diary.

License

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

sialertview's People

Contributors

kyoji2 avatar iiiyu avatar prolificgang avatar alexanderedge avatar linjunpop avatar ricsantos avatar tiagojsalmeida avatar mrcrow avatar filipengberg avatar

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.