You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
860 B
54 lines
860 B
// |
|
// 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; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|