PrefixHeader.pch 2.73 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 16 17 18 19 20 21 22 23 24
/**
 *  禁止所有的打印,提交AppStore时使用
 */
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif

25 26

/**
曹云霄's avatar
曹云霄 committed
27
 * 判断请求是否成功
28
 */
曹云霄's avatar
曹云霄 committed
29
#define RESULT(response) [returnValue[@"code"] isEqualToNumber:@0]
曹云霄's avatar
曹云霄 committed
30 31 32 33
/**
 * 数据
 */
#define RESPONSE(response) returnValue[@"data"]
34 35 36 37
/**
 * 消息
 */
#define MESSAGE(response) returnValue[@"message"]
38
/**
曹云霄's avatar
曹云霄 committed
39
 * 网络请求
40
 */
曹云霄's avatar
曹云霄 committed
41
#define HTTP [NetworkRequestClassManager manager]
42

曹云霄's avatar
曹云霄 committed
43
/**
曹云霄's avatar
曹云霄 committed
44
 * 本地存储
曹云霄's avatar
曹云霄 committed
45
 */
曹云霄's avatar
曹云霄 committed
46
#define UserDefault [NSUserDefaults standardUserDefaults]
曹云霄's avatar
曹云霄 committed
47 48

/**
曹云霄's avatar
曹云霄 committed
49
 *  通知
曹云霄's avatar
曹云霄 committed
50
 */
曹云霄's avatar
曹云霄 committed
51
#define Notification [NSNotificationCenter defaultCenter]
曹云霄's avatar
曹云霄 committed
52

曹云霄's avatar
曹云霄 committed
53
/**
曹云霄's avatar
曹云霄 committed
54
 *  AppDelegate代理
曹云霄's avatar
曹云霄 committed
55
 */
曹云霄's avatar
曹云霄 committed
56
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
曹云霄's avatar
曹云霄 committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

/**
 *  屏幕的物理高度
 */
#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
77 78 79 80
/**
 *  导航栏高度
 */
#define NavigationHeight 64
81
#define ZERO 0
82
#define ONE 1
曹云霄's avatar
曹云霄 committed
83

曹云霄's avatar
曹云霄 committed
84 85 86 87 88
/**
 *  caches路径
 */
#define kPathCaches  [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]

曹云霄's avatar
曹云霄 committed
89 90 91 92 93
/**
 *  断网标示
 */
#define BROKEN @"-1"

曹云霄's avatar
曹云霄 committed
94 95 96
/**
 *  主题蓝色
 */
97 98
#define kMainBlueColor [UIColor colorWithRed:89/255.0 green:172/255.0 blue:220/255.0 alpha:1.0]

曹云霄's avatar
曹云霄 committed
99 100 101
/**
 *  默认圆角系数
 */
曹云霄's avatar
曹云霄 committed
102
#define kCornerRadius 4
曹云霄's avatar
曹云霄 committed
103

104 105 106 107
/**
 *  主题灰色
 */
#define kMainGrayColor [UIColor colorWithRed:241/255.0 green:241/255.0 blue:241/255.0 alpha:1.0]
曹云霄's avatar
曹云霄 committed
108 109


曹云霄's avatar
曹云霄 committed
110 111 112
/**
 *  筛选框复选按钮圆角尺寸
 */
曹云霄's avatar
曹云霄 committed
113
#define kSelectedCornerRadius 25
曹云霄's avatar
曹云霄 committed
114

曹云霄's avatar
曹云霄 committed
115

勾芒's avatar
勾芒 committed
116
/**
曹云霄's avatar
曹云霄 committed
117
 *  RGB颜色
勾芒's avatar
勾芒 committed
118
 */
曹云霄's avatar
曹云霄 committed
119
#define RGB(A, B, C, D)    [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
曹云霄's avatar
曹云霄 committed
120

勾芒's avatar
勾芒 committed
121
/**
曹云霄's avatar
曹云霄 committed
122
 *  无数据友好图片
勾芒's avatar
勾芒 committed
123
 */
曹云霄's avatar
曹云霄 committed
124
#define kNoDataImage TCImage(@"圆角矩形-3-副本")
曹云霄's avatar
曹云霄 committed
125

勾芒's avatar
勾芒 committed
126 127 128 129 130
/**
 *  默认图
 */
#define REPLACEIMAGE [UIImage imageNamed:@"bg-img 副本"]

勾芒's avatar
勾芒 committed
131
/**
132
 *  导购默认显示头像
133
 */
134 135 136
#define GuideReplaceImage [UIImage imageNamed:@"manager"]

/**
137
 *  论坛客户默认显示头像
138 139
 */
#define CoustomerReplaceImage [UIImage imageNamed:@"user"]
曹云霄's avatar
曹云霄 committed
140

141 142 143 144 145 146
/**
 *  客户默认显示头像
 */
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]


曹云霄's avatar
曹云霄 committed
147 148 149 150 151
/**
 *  弱引用
 */
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self

曹云霄's avatar
曹云霄 committed
152

153

154 155 156 157 158 159 160







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