Giter VIP home page Giter VIP logo

talertview's Introduction

TAlertView

Preview

Screenshot of Input Examples

Features

  • simple to use
  • block syntax
  • physically animated user interaction
  • UIAppearance support

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

TAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "TAlertView"

How To Use It

Simple

[[[TAlertView alloc] initWithTitle:@"Great!" andMessage:@"This is a basic alert"] show];

Or with buttons

TAlertView *alert = [[TAlertView alloc] initWithTitle:nil
                                              message:@"This alert show two buttons horizontally"
                                              buttons:@[@"No", @"Yes"]
                                          andCallBack:^(TAlertView *alertView, NSInteger buttonIndex) {
                                                          //Your actions
                                                      }];
alert.buttonsAlign = TAlertViewButtonsAlignHorizontal;
[alert showAsMessage];

Change appearance

TAlertView *appearance = [TAlertView appearance];
    appearance.alertBackgroundColor     = [[UIColor blackColor] colorWithAlphaComponent:0.8];
    appearance.titleFont                = [UIFont fontWithName:@"Baskerville" size:22];
    appearance.messageColor             = [UIColor whiteColor];
    appearance.messageFont              = [UIFont fontWithName:@"Baskerville-SemiBoldItalic" size:14];
    appearance.buttonsTextColor         = [UIColor whiteColor];
    appearance.buttonsFont              = [UIFont fontWithName:@"Baskerville-Bold" size:16];
    appearance.separatorsLinesColor     = [UIColor grayColor];
    appearance.tapToCloseFont           = [UIFont fontWithName:@"Baskerville" size:10];
    appearance.tapToCloseColor          = [UIColor grayColor];
    appearance.tapToCloseText           = @"Touch to close";
    [appearance setTitleColor:[UIColor orangeColor] forAlertViewStyle:TAlertViewStyleError];
    [appearance setDefaultTitle:@"Error" forAlertViewStyle:TAlertViewStyleError];
    [appearance setTitleColor:[UIColor whiteColor] forAlertViewStyle:TAlertViewStyleNeutral];

Author

Washington Miranda, [email protected]

License

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

talertview's People

Contributors

washingtonmiranda avatar nicobistolfi avatar

Watchers

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