12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // ToolFoundation.m
- // IntercontinentalHealth
- //
- // Created by zsj on 2018/5/11.
- // Copyright © 2018年 ITpower. All rights reserved.
- //
- #import "ToolFoundation.h"
- @implementation ToolFoundation
- CGRect CGRM(CGFloat x, CGFloat y, CGFloat width, CGFloat height){
- return CGRectMake(x, y, width, height);
- }
- CGRect CGRM_PS(CGPoint origin, CGSize size){
- return CGRM(origin.x, origin.y, size.width, size.height);
- }
- CGSize CGSM(CGFloat width, CGFloat height){
- return CGSizeMake(width, height);
- }
- CGSize CGSM_SOS(CGSize originSize, CGSize offSizeSize){
- return CGSizeMake(originSize.width + offSizeSize.width, originSize.height + offSizeSize.height);
- }
- CGPoint CGPM(CGFloat x, CGFloat y){
- return CGPointMake(x, y);
- }
- CGPoint CGPM_POP(CGPoint originPoint, CGPoint offsetPoint){
- return CGPM(originPoint.x + offsetPoint.x, originPoint.y + offsetPoint.y);
- }
- CGPoint centerOfSize(CGSize size){
- return CGPM(size.width/2.f, size.height/2.f);
- }
- CGFloat CGFG_ScreenWidth()
- {
- return [UIScreen mainScreen].bounds.size.width;
- }
- CGFloat CGFG_ScreenHeight()
- {
- return [UIScreen mainScreen].bounds.size.height;
- }
- @end
|