-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXWWeiBo.pch
160 lines (123 loc) · 4.54 KB
/
XWWeiBo.pch
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
87
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
//
// XWWeiBo.pch
// XWeiBo
//
// Created by DP on 14/12/2.
// Copyright (c) 2014年 戴鹏. All rights reserved.
//
#ifndef XWeiBo_XWWeiBo_pch
#define XWeiBo_XWWeiBo_pch
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "UIImage+DP.h"
#import "WeiboSDK.h"
#import "WeiBocfg.h"
#import "UIView+Extension.h"
#import <POP/POP.h>
#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)
#define XWColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define XWRColor(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
// 随机色
#define XWRandomColor XWColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))
#define kXWEmotionMaxRows 3
#define kXWEmotionMaxCols 7
#define kXWEmotionMaxCountPerPage (kXWEmotionMaxRows * kXWEmotionMaxCols - 1)
// 3.自定义Log
#ifdef DEBUG
#define XWLog(...) NSLog(__VA_ARGS__)
#else
#define XWLog(...)
#endif
#endif
#define XWUserDefaults [NSUserDefaults standardUserDefaults]
#define XWUserImageQuality @"imageQuality"
#define XWUserWuFengReading @"wufengReading"
#define XWUserReadingDirection @"readDirection"
#define XWUserThemeColor @"themeColor"
/** 导航栏 */
// 导航栏标题颜色
#define XWNavigationBarTitleColor XWColor(65, 65, 65)
// 导航栏标题字体
#define XWNavigationBarTitleFont [UIFont boldSystemFontOfSize:19]
// 导航栏按钮文字颜色
#define XWBarButtonTitleColor (iOS7 ? XWColor(239, 113, 0) : XWColor(119, 119, 119))
#define XWBarButtonTitleDisabledColor XWColor(208, 208, 208)
// 导航栏按钮文字字体
#define XWBarButtonTitleFont (iOS7 ? [UIFont systemFontOfSize:15] : [UIFont boldSystemFontOfSize:12])
// 3.设置cell的边框宽度
#define kCellBorderWidth 10
// 设置tableView的边框宽度
#define kTableBorderWidth 8
// 设置每个cell之间的间距
#define kCellMargin 8
// 设置微博dock的高度
#define kStatusDockHeight 30
// 设置转发微博dock的高度
#define kRetweetedDockHeight 35
// 4.cell内部子控件的字体设置
#define kScreenNameFont [UIFont fontWithName:kLTFont size:16.0f]
#define kTimeFont [UIFont fontWithName:kLTFont size:14.0f]
#define kSourceFont kTimeFont
#define kTextFont [UIFont fontWithName:kLTFont size:16.0f]
#define kRichTextFont [UIFont fontWithName:kLTFont size:15.0f]
#define kRetweetedTextFont [UIFont fontWithName:kLTFont size:16.0f]
#define kRetweetedScreenNameFont [UIFont fontWithName:kLTFont size:16.0f]
#define kStatusHighTextColor XWColor(88, 161, 253)
// 7.图片
// 会员皇冠图标
#define kMBIconW 14
#define kMBIconH 14
// 头像
#define kIconSmallW 36
#define kIconSmallH 36
#define kIconDefaultW 52
#define kIconDefaultH 52
#define kIconBigW 87
#define kIconBigH 87
// 认证加V图标
#define kVertifyW 18
#define kVertifyH 18
// 5.获得RGB颜色
// 6.cell内部子控件的颜色设置
// 会员昵称颜色
#define kMBScreenNameColor XWColor(243, 101, 18)
// 非会员昵称颜色
#define kScreenNameColor XWColor(93, 93, 93);
// 被转发微博昵称颜色
#define kRetweetedScreenNameColor XWColor(63, 104, 161)
// 7.URL
#define XWBaseURL @"https://api.weibo.com"
#define XWURLWithPath(path) [NSString stringWithFormat:@"%@/%@", XWBaseURL, path]
//当前设备的屏幕宽高
#define XWScreenWitdh [[UIScreen mainScreen] bounds].size.width
#define XWScreenHeight [[UIScreen mainScreen] bounds].size.height
//表情相关
// 表情选中的通知
#define kXWEmotionDidSelectedNotification @"XWEmotionDidSelectedNotification"
// 点击删除按钮的通知
#define kXWEmotionDidDeletedNotification @"XWEmotionDidDeletedNotification"
// 通知里面取出表情用的key
#define kXWSelectedEmotion @"XWSelectedEmotion"
//富文本
#define kLinkText @"link"
#define kMetionSomeone @"motionSome"
#define kTopic @"topic"
//pushVC通知
#define kPushVC @"kPushViewController"
#define kPopVC @"kPopViewController"
//字体
#define kLTFont @"FZLTXHK--GBK1-0"
//链接选中的通知
#define kLinkDidSelectedNotification @"kLinkDidSelectedNotification"
#define kLinkWillSelectedNotification @"kLinkWillSelectedNotification"
//全局主题颜色变换
#define themeChangeNotification @"themeDidChangeNotification"
//用户存储密码
#define kUserPin @"userPin"
#define kUserSetFirstPin @"setFirstPin"
#define kUserSetSecPin @"setSecPin"
#define kUserHasThePin @"UserHasSetThePin"