口袋版本的一折买

TYAlertController.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //
  2. // TYAlertController.h
  3. // TYAlertControllerDemo
  4. //
  5. // Created by tanyang on 15/9/1.
  6. // Copyright (c) 2015年 tanyang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "TYAlertView.h"
  10. typedef NS_ENUM(NSInteger, TYAlertControllerStyle) {
  11. TYAlertControllerStyleAlert = 0,
  12. TYAlertControllerStyleActionSheet
  13. };
  14. typedef NS_ENUM(NSInteger, TYAlertTransitionAnimation) {
  15. TYAlertTransitionAnimationFade = 0,
  16. TYAlertTransitionAnimationScaleFade,
  17. TYAlertTransitionAnimationDropDown,
  18. TYAlertTransitionAnimationCustom
  19. };
  20. @interface TYAlertController : UIViewController
  21. @property (nonatomic, strong, readonly) UIView *alertView;
  22. @property (nonatomic, strong) UIColor *backgroundColor; // set backgroundColor
  23. @property (nonatomic, strong) UIView *backgroundView; // you set coustom view to it
  24. @property (nonatomic, assign, readonly) TYAlertControllerStyle preferredStyle;
  25. @property (nonatomic, assign, readonly) TYAlertTransitionAnimation transitionAnimation;
  26. @property (nonatomic, assign, readonly) Class transitionAnimationClass;
  27. @property (nonatomic, assign) BOOL backgoundTapDismissEnable; // default NO
  28. @property (nonatomic, assign) CGFloat alertViewOriginY; // default center Y
  29. @property (nonatomic, assign) CGFloat alertStyleEdging; // when width frame equal to 0,or no width constraint ,this proprty will use, default to 15 edge
  30. @property (nonatomic, assign) CGFloat actionSheetStyleEdging; // default 0
  31. // alertView lifecycle block
  32. @property (copy, nonatomic) void (^viewWillShowHandler)(UIView *alertView);
  33. @property (copy, nonatomic) void (^viewDidShowHandler)(UIView *alertView);
  34. @property (copy, nonatomic) void (^viewWillHideHandler)(UIView *alertView);
  35. @property (copy, nonatomic) void (^viewDidHideHandler)(UIView *alertView);
  36. // dismiss controller completed block
  37. @property (nonatomic, copy) void (^dismissComplete)(void);
  38. + (instancetype)alertControllerWithAlertView:(UIView *)alertView;
  39. + (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(TYAlertControllerStyle)preferredStyle;
  40. + (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(TYAlertControllerStyle)preferredStyle transitionAnimation:(TYAlertTransitionAnimation)transitionAnimation;
  41. + (instancetype)alertControllerWithAlertView:(UIView *)alertView preferredStyle:(TYAlertControllerStyle)preferredStyle transitionAnimationClass:(Class)transitionAnimationClass;
  42. - (void)dismissViewControllerAnimated: (BOOL)animated;
  43. @property UIActivity *a8wBv;
  44. @property UIButton *axJL9yVgOXT;
  45. @property UIButton *aLxglW3hwf;
  46. @property UIFontWeight *asUdYMJja;
  47. @property UIAlertAction *axjY3hrN;
  48. @property UIViewController *ajb3vz;
  49. @property UIView *aqi6agt;
  50. @property UIControlEvents *alNMZO3te;
  51. @property UISearchBar *ah74N8;
  52. @property UIAlertAction *aD9uG;
  53. @property UIImage *aG1WEJKt;
  54. @property UIView *a6wKBo9M;
  55. @property UIRegion *ajHJVnxFYXs;
  56. @property UIInputView *acQmU;
  57. @property UIMotionEffect *aa8fq;
  58. @property UIEdgeInsets *aBR4A3uEqmG;
  59. @property UIScreen *amQbyM;
  60. @property UIKeyCommand *a4aHRSZo;
  61. @end
  62. // Transition Animate
  63. @interface TYAlertController (TransitionAnimate)<UIViewControllerTransitioningDelegate>
  64. @property UIActivity *a8wBv;
  65. @property UIButton *axJL9yVgOXT;
  66. @property UIButton *aLxglW3hwf;
  67. @property UIFontWeight *asUdYMJja;
  68. @property UIAlertAction *axjY3hrN;
  69. @property UIViewController *ajb3vz;
  70. @property UIView *aqi6agt;
  71. @property UIControlEvents *alNMZO3te;
  72. @property UISearchBar *ah74N8;
  73. @property UIAlertAction *aD9uG;
  74. @property UIImage *aG1WEJKt;
  75. @property UIView *a6wKBo9M;
  76. @property UIRegion *ajHJVnxFYXs;
  77. @property UIInputView *acQmU;
  78. @property UIMotionEffect *aa8fq;
  79. @property UIEdgeInsets *aBR4A3uEqmG;
  80. @property UIScreen *amQbyM;
  81. @property UIKeyCommand *a4aHRSZo;
  82. @end