55 lines
860 B
Objective-C
Executable File
55 lines
860 B
Objective-C
Executable File
//
|
|
// YBRectMake.h
|
|
// YBPopupMenu
|
|
//
|
|
// Created by lyb on 2017/5/9.
|
|
// Copyright © 2017年 lyb. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectWidth(CGRect rect)
|
|
{
|
|
return rect.size.width;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectHeight(CGRect rect)
|
|
{
|
|
return rect.size.height;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectX(CGRect rect)
|
|
{
|
|
return rect.origin.x;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectY(CGRect rect)
|
|
{
|
|
return rect.origin.y;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectTop(CGRect rect)
|
|
{
|
|
return rect.origin.y;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectBottom(CGRect rect)
|
|
{
|
|
return rect.origin.y + rect.size.height;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectLeft(CGRect rect)
|
|
{
|
|
return rect.origin.x;
|
|
}
|
|
|
|
UIKIT_STATIC_INLINE CGFloat YBRectRight(CGRect rect)
|
|
{
|
|
return rect.origin.x + rect.size.width;
|
|
}
|
|
|
|
|
|
|
|
|
|
|