1234567891011121314151617181920212223242526272829303132 |
- //
- // UIView+PageRect.m
- // WMZPageController
- //
- // Created by wmz on 2019/12/16.
- // Copyright © 2019 wmz. All rights reserved.
- //
- #import "UIView+PageRect.h"
- @implementation UIView (PageRect)
- - (void)page_y:(CGFloat)y{
- CGRect rect = self.frame;
- rect.origin.y = y;
- self.frame = rect;
- }
- - (void)page_x:(CGFloat)x{
- CGRect rect = self.frame;
- rect.origin.x = x;
- self.frame = rect;
- }
- - (void)page_width:(CGFloat)width{
- CGRect rect = self.frame;
- rect.size.width = width;
- self.frame = rect;
- }
- - (void)page_height:(CGFloat)height{
- CGRect rect = self.frame;
- rect.size.height = height;
- self.frame = rect;
- }
- @end
|