CustomIOSAlertView.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // CustomIOSAlertView.h
  3. // CustomIOSAlertView
  4. //
  5. // Created by Richard on 20/09/2013.
  6. // Copyright (c) 2013-2015 Wimagguc.
  7. //
  8. // Lincesed under The MIT License (MIT)
  9. // http://opensource.org/licenses/MIT
  10. //
  11. #import <UIKit/UIKit.h>
  12. @protocol CustomIOSAlertViewDelegate
  13. - (void)customIOS7dialogButtonTouchUpInside:(id)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
  14. @end
  15. @interface CustomIOSAlertView : UIView<CustomIOSAlertViewDelegate>
  16. @property (nonatomic, retain) UIView *parentView; // The parent view this 'dialog' is attached to
  17. @property (nonatomic, retain) UIView *dialogView; // Dialog's container view
  18. @property (nonatomic, retain) UIView *containerView; // Container within the dialog (place your ui elements here)
  19. @property (nonatomic, assign) id<CustomIOSAlertViewDelegate> delegate;
  20. @property (nonatomic, retain) NSArray *buttonTitles;
  21. @property (nonatomic, assign) BOOL useMotionEffects;
  22. @property (copy) void (^onButtonTouchUpInside)(CustomIOSAlertView *alertView, int buttonIndex) ;
  23. - (id)init;
  24. /*!
  25. DEPRECATED: Use the [CustomIOSAlertView init] method without passing a parent view.
  26. */
  27. - (id)initWithParentView: (UIView *)_parentView __attribute__ ((deprecated));
  28. - (void)show;
  29. - (void)close;
  30. - (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender;
  31. - (void)setOnButtonTouchUpInside:(void (^)(CustomIOSAlertView *alertView, int buttonIndex))onButtonTouchUpInside;
  32. - (void)deviceOrientationDidChange: (NSNotification *)notification;
  33. - (void)dealloc;
  34. @end