PrefixHeader.pch 2.33 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10
//
//  PrefixHeader.pch
//  Lighting
//
//  Created by 曹云霄 on 16/4/27.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#ifndef PrefixHeader_pch
#define PrefixHeader_pch
11
#import "CYConstManager.h"
曹云霄's avatar
曹云霄 committed
12

曹云霄's avatar
曹云霄 committed
13

14 15

/**
曹云霄's avatar
曹云霄 committed
16
 * 判断请求是否成功
17
 */
曹云霄's avatar
曹云霄 committed
18
#define RESULT(response) [returnValue[@"code"] isEqualToNumber:@0]
曹云霄's avatar
曹云霄 committed
19 20 21 22
/**
 * 数据
 */
#define RESPONSE(response) returnValue[@"data"]
23 24 25 26
/**
 * 消息
 */
#define MESSAGE(response) returnValue[@"message"]
27
/**
曹云霄's avatar
曹云霄 committed
28
 * 网络请求
29
 */
曹云霄's avatar
曹云霄 committed
30
#define HTTP [NetworkRequestClassManager manager]
31

曹云霄's avatar
曹云霄 committed
32
/**
曹云霄's avatar
曹云霄 committed
33
 * 本地存储
曹云霄's avatar
曹云霄 committed
34
 */
曹云霄's avatar
曹云霄 committed
35
#define UserDefault [NSUserDefaults standardUserDefaults]
曹云霄's avatar
曹云霄 committed
36 37

/**
曹云霄's avatar
曹云霄 committed
38
 *  通知
曹云霄's avatar
曹云霄 committed
39
 */
曹云霄's avatar
曹云霄 committed
40
#define Notification [NSNotificationCenter defaultCenter]
曹云霄's avatar
曹云霄 committed
41

曹云霄's avatar
曹云霄 committed
42
/**
曹云霄's avatar
曹云霄 committed
43
 *  AppDelegate代理
曹云霄's avatar
曹云霄 committed
44
 */
曹云霄's avatar
曹云霄 committed
45
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
曹云霄's avatar
曹云霄 committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65

/**
 *  屏幕的物理高度
 */
#define ScreenHeight   [UIScreen mainScreen].bounds.size.height

/**
 *  屏幕的物理宽度
 */
#define ScreenWidth    [UIScreen mainScreen].bounds.size.width

/**
 *  定义UIImage对象
 */
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]

/**
 * 右侧菜单宽度
 */
#define RightWidth 200
曹云霄's avatar
曹云霄 committed
66 67 68 69
/**
 *  导航栏高度
 */
#define NavigationHeight 64
70
#define ZERO 0
71
#define ONE 1
曹云霄's avatar
曹云霄 committed
72

曹云霄's avatar
曹云霄 committed
73 74 75 76 77
/**
 *  caches路径
 */
#define kPathCaches  [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]

曹云霄's avatar
曹云霄 committed
78 79 80 81 82
/**
 *  断网标示
 */
#define BROKEN @"-1"

曹云霄's avatar
曹云霄 committed
83 84 85
/**
 *  主题蓝色
 */
86 87
#define kMainBlueColor [UIColor colorWithRed:89/255.0 green:172/255.0 blue:220/255.0 alpha:1.0]

曹云霄's avatar
曹云霄 committed
88 89 90
/**
 *  默认圆角系数
 */
曹云霄's avatar
曹云霄 committed
91
#define kCornerRadius 4
曹云霄's avatar
曹云霄 committed
92

93 94 95 96
/**
 *  主题灰色
 */
#define kMainGrayColor [UIColor colorWithRed:241/255.0 green:241/255.0 blue:241/255.0 alpha:1.0]
曹云霄's avatar
曹云霄 committed
97 98


曹云霄's avatar
曹云霄 committed
99 100 101
/**
 *  筛选框复选按钮圆角尺寸
 */
曹云霄's avatar
曹云霄 committed
102
#define kSelectedCornerRadius 25
曹云霄's avatar
曹云霄 committed
103

曹云霄's avatar
曹云霄 committed
104

勾芒's avatar
勾芒 committed
105
/**
曹云霄's avatar
曹云霄 committed
106
 *  RGB颜色
勾芒's avatar
勾芒 committed
107
 */
曹云霄's avatar
曹云霄 committed
108
#define RGB(A, B, C, D)    [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
曹云霄's avatar
曹云霄 committed
109

勾芒's avatar
勾芒 committed
110
/**
曹云霄's avatar
曹云霄 committed
111
 *  无数据友好图片
勾芒's avatar
勾芒 committed
112
 */
曹云霄's avatar
曹云霄 committed
113
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
曹云霄's avatar
曹云霄 committed
114

勾芒's avatar
勾芒 committed
115 116 117 118 119
/**
 *  默认图
 */
#define REPLACEIMAGE [UIImage imageNamed:@"bg-img 副本"]

勾芒's avatar
勾芒 committed
120
/**
曹云霄's avatar
曹云霄 committed
121
 *  默认显示头像
122
 */
曹云霄's avatar
曹云霄 committed
123
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
曹云霄's avatar
曹云霄 committed
124

曹云霄's avatar
曹云霄 committed
125 126 127 128 129
/**
 *  弱引用
 */
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self

曹云霄's avatar
曹云霄 committed
130

131

132 133 134 135 136 137 138







曹云霄's avatar
曹云霄 committed
139
#endif /* PrefixHeader_pch */