Git Product home page Git Product logo

affalertview's Introduction

AFFAlertView

AFFAlertView is a customizable alert view built for iOS. It is compatible with iOS 6+ so older devices can benefit from the iOS 7 UIAlertView look and feel. AFFAlertView comes with a list of modifiable properties which can give the alert view a custom style. It also supports subclassing so customization is even more abundant.

##Purpose The main purpose of this software is to provide developers with a customizable version of UIAlertView. It has similar functionality to UIAlertView and supports subclassing. The secondary purpose of this software is to provide iOS 6 developers an iOS 7 styled UIAlertView alternative.

##Installation

  1. Install via CocoaPods Add the following line to your .podfile

    pod 'AFFAlertView'
    
  2. Use and enjoy!

##Support ####IOS Earliest tested and supported build and deployment target - iOS 6.0.
Latest tested and supported build and deployment target - iOS 7.1.

##ARC Compatibility AFFAlertView is built from ARC and is ARC compatible.

##Usage ####AFFAlertView initialization AFFAlertView can be used identically to UIAlert view.

AFFAlertView *alertView = [[AFFAlertView alloc] initWithTitle:@"Title here"
                                                message:@"Message here"
                                                buttonTitles:@[@"Cancel”, @“Okay"]];

The AFFAlertView instance may optionally be provided with a delegate.

alertView.delegate = self;

Showing in the AFFAlertView instance is identical to a UIAlertView.

[alertView show];

AFFAlertView also has an option to manually dismiss the alert view.

[alertView dismiss];

####AFFAlertView delegate AFFAlertViewDelegate is a fully optional protocol that provides useful functionality for alert dismissal clicks and basic UI interactions.

/** Called before showing the alert view. This is used to override the default alert view size within constraints such as keyboard size and orientation. */
- (CGSize)alertViewPreferredSize:(AFFAlertView *)alertView;

/** Called when an alert view button has been selected. */
- (void)alertView:(AFFAlertView *)alertView didDismissWithButton:(AFFAlertViewButtonModel *)buttonModel;

/** Called when the alert view will open. */
- (void)alertViewWillShow:(AFFAlertView *)alertView;

/** Called when the alert view has opened. */
- (void)alertViewDidShow:(AFFAlertView *)alertView;

/** Called when the alert view will close. */
- (void)alertViewWillDismss:(AFFAlertView *)alertView;

/** Called when the alert view has closed. */
- (void)alertViewDidDismss:(AFFAlertView *)alertView;

affalertview's People

Contributors

jfuellert avatar

Stargazers

 avatar  avatar lianpeng527 avatar Muhammad Naeem Paracha avatar Derek Hartley avatar azu avatar  avatar Martin Høst Normark avatar Andrew Apperley avatar  avatar

Watchers

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