-
Notifications
You must be signed in to change notification settings - Fork 218
/
UIView+YNPageExtend.h
35 lines (21 loc) · 929 Bytes
/
UIView+YNPageExtend.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// UIView+YNPageExtend.h
// YNPageViewController
//
// Created by ZYN on 2018/4/22.
// Copyright © 2018年 yongneng. All rights reserved.
//
#import <UIKit/UIKit.h>
#define kYNPAGE_SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define kYNPAGE_SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)
#define kYNPAGE_IS_IPHONE_X ((kYNPAGE_SCREEN_HEIGHT == 812.0f && kYNPAGE_SCREEN_WIDTH == 375.0f) ? YES : NO)
#define kYNPAGE_NAVHEIGHT (kYNPAGE_IS_IPHONE_X ? 88 : 64)
#define kYNPAGE_TABBARHEIGHT (kYNPAGE_IS_IPHONE_X ? 83 : 49)
#define kLESS_THAN_iOS11 ([[UIDevice currentDevice].systemVersion floatValue] < 11.0 ? YES : NO)
@interface UIView (YNPageExtend)
@property (nonatomic, assign) CGFloat yn_x;
@property (nonatomic, assign) CGFloat yn_y;
@property (nonatomic, assign) CGFloat yn_width;
@property (nonatomic, assign) CGFloat yn_height;
@property (nonatomic, assign) CGFloat yn_bottom;
@end