// // UIView+MT.h // // Created by Simon on 2019/3/22. // Copyright © 2019 Simon. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN @interface UIView (MT) //类别可以拓展属性,但是不能生成set和get方法 @property (assign, nonatomic) CGFloat mt_x; @property (assign, nonatomic) CGFloat mt_y; @property (assign, nonatomic) CGFloat mt_width; @property (assign, nonatomic) CGFloat mt_height; @property (assign, nonatomic) CGSize mt_size; @property (assign, nonatomic) CGPoint mt_origin; // 圆角 - (void) mt_yuanjiao:(CGFloat)radius; // 边框 - (void) mt_biankuang:(CGFloat) width color:(UIColor *)color; // 关闭用户响应 - (void) mt_closeUserInteractionOfSubViews; // 打开用户响应 - (void) mt_openUserInteractionOfSubViews; // 隐藏 - (void) mt_hideAllSubViews; // 展示 - (void) mt_showAllSubViews; // 删除 - (void) mt_removeAllSubViews; //部分圆角 - (void)addRoundedCorners:(UIRectCorner)corners withRadii:(CGSize)radii viewRect:(CGRect)rect; /// 阴影 /// @param shadowColor 阴影颜色 /// @param shadowOffset 阴影偏移量(-x,-x)左上阴影 (0,0)全阴影 (x,x)右下阴影 /// @param shadowOpacity 阴影透明度 /// @param shadowRadius 阴影半径 /// @param cornerRadius 圆角 -(void)mt_shadowWithShadowColor:(UIColor *)shadowColor andShadowOffset:(CGSize)shadowOffset andShadowOpacity:(float )shadowOpacity andShadowRadius:(float)shadowRadius andCornerRadius:(float)cornerRadius; @end NS_ASSUME_NONNULL_END