//
//  UIView+Frame.m
//  WMBase
//
//  Created by 王猛 on 2023/5/17.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
-(CGFloat)maxX{
    return CGRectGetMaxX(self.frame);
}
-(CGFloat)maxY{
    return CGRectGetMaxY(self.frame);
}
- (void)setCenterY:(CGFloat)centerY
{
    CGPoint center = self.center;
    center.y = centerY;
    self.center = center;
}
- (void)setCenterX:(CGFloat)centerX
{
    CGPoint center = self.center;
    center.x = centerX;
    self.center = center;
}

- (CGFloat)centerX
{
    return self.center.x;
}

- (CGFloat)centerY
{
    return self.center.y;
}

@end
