UIView+Layout.h 1.2 KB

123456789101112131415161718192021222324252627282930
  1. //
  2. // UIView+Layout.h
  3. //
  4. // Created by 谭真 on 15/2/24.
  5. // Copyright © 2015年 谭真. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. typedef enum : NSUInteger {
  9. TZOscillatoryAnimationToBigger,
  10. TZOscillatoryAnimationToSmaller,
  11. } TZOscillatoryAnimationType;
  12. @interface UIView (Layout)
  13. @property (nonatomic) CGFloat tz_left; ///< Shortcut for frame.origin.x.
  14. @property (nonatomic) CGFloat tz_top; ///< Shortcut for frame.origin.y
  15. @property (nonatomic) CGFloat tz_right; ///< Shortcut for frame.origin.x + frame.size.width
  16. @property (nonatomic) CGFloat tz_bottom; ///< Shortcut for frame.origin.y + frame.size.height
  17. @property (nonatomic) CGFloat tz_width; ///< Shortcut for frame.size.width.
  18. @property (nonatomic) CGFloat tz_height; ///< Shortcut for frame.size.height.
  19. @property (nonatomic) CGFloat tz_centerX; ///< Shortcut for center.x
  20. @property (nonatomic) CGFloat tz_centerY; ///< Shortcut for center.y
  21. @property (nonatomic) CGPoint tz_origin; ///< Shortcut for frame.origin.
  22. @property (nonatomic) CGSize tz_size; ///< Shortcut for frame.size.
  23. + (void)showOscillatoryAnimationWithLayer:(CALayer *)layer type:(TZOscillatoryAnimationType)type;
  24. @end