PrefixHeader.pch 3.05 KB
Newer Older
曹云霄's avatar
曹云霄 committed
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
//
//  PrefixHeader.pch
//  Lighting
//
//  Created by 曹云霄 on 16/4/27.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#ifndef PrefixHeader_pch
#define PrefixHeader_pch
#import "CYConstManager.h"


/**
 *  禁止所有的打印,提交AppStore时使用
 */
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif


/**
 * 判断请求是否成功
 */
#define RESULT(response) [returnValue[@"code"] isEqualToNumber:@0]
/**
 * 数据
 */
#define RESPONSE(response) returnValue[@"data"]
/**
 * 消息
 */
#define MESSAGE(response) returnValue[@"message"]
/**
 * 网络请求
 */
#define HTTP [NetworkRequestClassManager manager]

/**
 * 本地存储
 */
#define UserDefault [NSUserDefaults standardUserDefaults]

/**
 *  通知
 */
#define Notification [NSNotificationCenter defaultCenter]

/**
 *  AppDelegate代理
 */
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))

/**
 *  屏幕的物理高度
 */
#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
/**
 *  导航栏高度
 */
#define NavigationHeight 64
#define ZERO 0
#define ONE 1

/**
 *  caches路径
 */
曹云霄's avatar
曹云霄 committed
87
#define kPathCaches  [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex_opple:0]
曹云霄's avatar
曹云霄 committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

/**
 *  断网标示
 */
#define BROKEN @"-1"

/**
 *  主题蓝色
 */
#define kMainBlueColor [UIColor colorWithRed:89/255.0 green:172/255.0 blue:220/255.0 alpha:1.0]

/**
 *  默认圆角系数
 */
#define kCornerRadius 4

/**
 *  主题灰色
 */
#define kMainGrayColor [UIColor colorWithRed:241/255.0 green:241/255.0 blue:241/255.0 alpha:1.0]


/**
 *  筛选框复选按钮圆角尺寸
 */
#define kSelectedCornerRadius 25


/**
 *  RGB颜色
 */
#define RGB(A, B, C, D)    [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]

/**
 *  无数据友好图片
 */
#define kNoDataImage TCImage(@"圆角矩形-3-副本")

/**
 *  默认图
 */
129
#define REPLACEIMAGE [UIImage imageNamed:@"loadingImage"]
曹云霄's avatar
曹云霄 committed
130 131 132 133 134 135 136 137 138 139 140 141 142 143

/**
 *  导购默认显示头像
 */
#define GuideReplaceImage [UIImage imageNamed:@"manager"]

/**
 *  论坛客户默认显示头像
 */
#define CoustomerReplaceImage [UIImage imageNamed:@"user"]

/**
 *  客户默认显示头像
 */
144
#define ReplaceImage [UIImage imageNamed:@"customer"]
曹云霄's avatar
曹云霄 committed
145 146 147 148 149 150 151


/**
 *  弱引用
 */
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self

152 153 154 155 156 157 158 159 160 161 162 163 164 165
//订单状态
/// - UNPAID:    未付款
/// - PAID:      已付款
/// - SHIPPED:   已发货
/// - RETURN:    已退货
/// - CANCELED:  已撤销
/// - COMPLETED: 已完成
#define UNPAID    @"001"
#define PAID      @"002"
#define SHIPPED   @"003"
#define RETURN    @"004"
#define CANCELED  @"005"
#define COMPLETED @"006"

曹云霄's avatar
曹云霄 committed
166 167 168 169 170 171 172 173 174 175









#endif /* PrefixHeader_pch */