-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathYLDefine.h
More file actions
27 lines (22 loc) · 816 Bytes
/
YLDefine.h
File metadata and controls
27 lines (22 loc) · 816 Bytes
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
//
// YLDefine.h
// DraggingSort
//
// Created by HelloYeah on 2016/12/5.
// Copyright © 2016年 YL. All rights reserved.
//
#ifndef YLDefine_h
#define YLDefine_h
/*** 当前屏幕宽度 */
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
/*** 当前屏幕高度 */
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
/*** 屏宽比例 */
#define SCREEN_WIDTH_RATIO (SCREEN_WIDTH / 375)
#define kLineHeight (1 / [UIScreen mainScreen].scale)
#pragma mark - 字体
/*** 普通字体 */
#define kFont(size) [UIFont systemFontOfSize:((size) * SCREEN_WIDTH_RATIO + SCREEN_WIDTH_RATIO * (SCREEN_WIDTH_RATIO < 1 ? 1 : - 1 ))]
//根据RGB值创建UIColor
#define RGBColorMake(R,G,B,_alpha_) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:_alpha_]
#endif /* YLDefine_h */