Coder Social home page Coder Social logo

zilaiyedaren / jcalertview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from richdaddycashmany/jcalertcontroller

0.0 1.0 0.0 243 KB

one line code use; auto textView; blur background; support iOS6+;

License: MIT License

Objective-C 100.00%

jcalertview's Introduction

JCAlertView

The simplest Alert !

(logo)

Introduce

  • 1.The simplest UIAlertView replacement. You can use it just write one line of code.
  • 2.Don't be afraid that the length of message is too long. There is a UITextView to show long message automatically.It supports line break.
  • 3.Support queue to manager alertViews .
  • 4.Nice blur background .
  • 5.Block syntax.
  • 6.Support iOS 6 and greater.
  • 7.Please add Accelerate.framework before use.

How to use ?

[1] You should add Accelerate.framework first.

[2] After that, please look at the following codes or download demo directly.

1.Show JCAlertView with 1 button

[JCAlertView showOneButtonWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button" Click:^{
    NSLog(@"click0");
}];

2.Show JCAlertView with 2 buttons

[JCAlertView showTwoButtonsWithTitle:@"title" Message:@"message" ButtonType:JCAlertViewButtonTypeCancel ButtonTitle:@"button0" Click:^{
    NSLog(@"click0");
} ButtonType:JCAlertViewButtonTypeDefault ButtonTitle:@"button1" Click:^{
     NSLog(@"click1");
}];

3.Show JCAlertView with more than 2 buttons

[JCAlertView showMultipleButtonsWithTitle:@"title" Message:@"message" Click:^(NSInteger index) {
    NSLog(@"click%zi", index);
} Buttons:@{@(JCAlertViewButtonTypeDefault):@"index = 0"},@{@(JCAlertViewButtonTypeCancel):@"index = 1"},@{@(JCAlertViewButtonTypeWarn):@"index = 2"}, nil];

Contact me

If you have any question or suggestion please feel free to connect me. Thank you!

jcalertview's People

Contributors

richdaddycashmany avatar

Watchers

Kent 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.