text: //
  //  SIAlertView.h
  //  SIAlertView
  //
  //  Created by Kevin Cao on 13-4-29.
  //  Copyright (c) 2013年 Sumi Interactive. All rights reserved.
  //
  
  #import <UIKit/UIKit.h>
  
  extern NSString *const SIAlertViewWillShowNotification;
  extern NSString *const SIAlertViewDidShowNotification;
  extern NSString *const SIAlertViewWillDismissNotification;
  extern NSString *const SIAlertViewDidDismissNotification;
  
  typedef NS_ENUM(NSInteger, SIAlertViewButtonType) {
      SIAlertViewButtonTypeDefault = 0,
      SIAlertViewButtonTypeDestructive,
      SIAlertViewButtonTypeCancel
  };
  
  typedef NS_ENUM(NSInteger, SIAlertViewBackgroundStyle) {
      SIAlertViewBackgroundStyleGradient = 0,
      SIAlertViewBackgroundStyleSolid,
  };
  
  typedef NS_ENUM(NSInteger, SIAlertViewButtonsListStyle) {
      SIAlertViewButtonsListStyleNormal = 0,
      SIAlertViewButtonsListStyleRows
  };
  
  typedef NS_ENUM(NSInteger, SIAlertViewTransitionStyle) {
      SIAlertViewTransitionStyleSlideFromBottom = 0,
      SIAlertViewTransitionStyleSlideFromTop,
      SIAlertViewTransitionStyleFade,
      SIAlertViewTransitionStyleBounce,
      SIAlertViewTransitionStyleDropDown
  };
  
  typedef NS_ENUM(NSInteger, SIAlertViewContentViewPosision) {
      SIAlertViewContentViewPosisionBottom = 0,
      SIAlertViewContentViewPosisionTop,
      SIAlertViewContentViewPosisionBelowTitle,
      SIAlertViewContentViewPosisionAboveTextFields,
  };
  
  @class SIAlertView;
  typedef void(^SIAlertViewHandler)(SIAlertView *alertView);
  typedef BOOL(^SIAlertViewActionHandler)(SIAlertView *alertView);
  typedef void(^SIAlertViewDismissHandler)(SIAlertView *alertView, NSInteger buttonIndex);
  
  @interface SIAlertView : UIView
  
  @property (nonatomic, copy) NSString *title;
  @property (nonatomic, copy) NSString *message;
  @property (nonatomic, strong) NSMutableArray *textFields;
  @property (nonatomic, strong, readonly) NSMutableArray *buttons;
  @property (nonatomic, strong) UIView *contentView;
  
  @property (nonatomic, assign) SIAlertViewTransitionStyle transitionStyle NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is SIAlertViewTransitionStyleSlideFromBottom
  @property (nonatomic, assign) SIAlertViewBackgroundStyle backgroundStyle; // default is SIAlertViewButtonTypeGradient
  @property (nonatomic, assign) SIAlertViewButtonsListStyle buttonsListStyle; // default is SIAlertViewButtonsListStyleNormal
  @property (nonatomic, assign) SIAlertViewContentViewPosision contentViewPosition; // default is SIAlertViewContentViewPosisionCenter
  
  @property (nonatomic, copy) SIAlertViewHandler willShowHandler;
  @property (nonatomic, copy) SIAlertViewHandler didShowHandler;
  @property (nonatomic, copy) SIAlertViewDismissHandler willDismissHandler;
  @property (nonatomic, copy) SIAlertViewDismissHandler didDismissHandler;
  
  @property (nonatomic, readonly, getter = isVisible) BOOL visible;
  
  @property (nonatomic, readonly, getter = isParallaxEffectEnabled) BOOL enabledParallaxEffect;
  
  @property (nonatomic, strong) UIColor *viewBackgroundColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIColor *titleColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIColor *messageColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIFont *titleFont NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIFont *messageFont NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIFont *buttonFont NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIColor *buttonColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIColor *cancelButtonColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, strong) UIColor *destructiveButtonColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  @property (nonatomic, assign) CGFloat cornerRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 2.0
  @property (nonatomic, assign) CGFloat shadowRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 8.0
  
  - (void)setDefaultButtonImage:(UIImage *)defaultButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  - (void)setCancelButtonImage:(UIImage *)cancelButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  - (void)setDestructiveButtonImage:(UIImage *)destructiveButtonImage forState:(UIControlState)state NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
  
  - (id)initWithTitle:(NSString *)title
           andMessage:(NSString *)message;
  - (id)initWithTitle:(NSString *)title
           andMessage:(NSString *)message
          contentView:(UIView *)contentView
             position:(SIAlertViewContentViewPosision)position;
  - (void)setContentView:(UIView *)contentView
              atPosition:(SIAlertViewContentViewPosision)position;
  - (void)addButtonWithTitle:(NSString *)title
                        type:(SIAlertViewButtonType)type
                     handler:(SIAlertViewActionHandler)handler;
  - (void)addTextFieldWithPlaceHolder:(NSString *)placeholder
                              andText:(NSString *)text
                               secure:(BOOL)secure;
  
  - (void)show;
  - (void)dismissAnimated:(BOOL)animated;
  - (void)dismissAnimated:(BOOL)animated cleanup:(BOOL)cleanup;
  
  + (void)configAlertView;
  @end
  