Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
195 lines (158 loc) · 7.71 KB

File metadata and controls

195 lines (158 loc) · 7.71 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "NSString+Common.h"
#import "NSObject+Common.h"
#import "UIImage+Common.h"
#import "UIButton+Bootstrap.h"
#import "UIColor+expanded.h"
#import "UIButton+Common.h"
#import "UITableView+Common.h"
#import "UIView+Common.h"
#import "UILabel+Common.h"
#import "NSDate+Common.h"
#import "UIBarButtonItem+Common.h"
#import "UIActionSheet+Common.h"
#import "NSURL+Common.h"
#import "UISearchBar+Common.h"
#import "UITTTAttributedLabel.h"
#import "NSObject+ObjectMap.h"
#import "ImageSizeManager.h"
#import "MobClick.h"
#import <BlocksKit/BlocksKit+UIKit.h>
#import <ReactiveCocoa/ReactiveCocoa.h>
#import <ReactiveCocoa/RACEXTScope.h>
#import "UIImageView+WebCache.h"
#import <Masonry/Masonry.h>
#import "BaseNavigationController.h"
#import "BaseViewController.h"
#endif
#define SD_WEBP
//友盟统计
#define kUmeng_AppKey @""
#define kUmeng_Event_Request_Notification @"Request_Notification"
#define kUmeng_Event_Request_RootList @"Request_RootList"
#define kUmeng_Event_Request_Get @"Request_Get"
#define kUmeng_Event_Request_ActionOfServer @"Request_ActionOfServer"
#define kUmeng_Event_Request_ActionOfLocal @"Request_ActionOfLocal"
//Social Data
#define kSocial_WX_ID @""
#define kSocial_WX_Secret @""
#define kSocial_QQ_ID @""
#define kSocial_QQ_Secret @""
#define kSocial_EN_Key @""
#define kSocial_EN_Secret @""
#define kSocial_Sina_RedirectURL @""
#define kSocial_Sina_OfficailAccount @""
//信鸽推送
#define kXGPush_Id 123456
#define kXGPush_Key @""
//百度定位
#define kBaiduGeotableId @""
#define kBaiduAK @""
#define kBaiduSK @""
//测试地址
#define kBaseUrlStr_Test @"https://coding.net/"
//手机版地址
#define kBaseUrlStr_Phone @"https://m.coding.net/"
//Coding App 的专属链接
#define kCodingAppScheme @"coding-net:"
//appStore地址
#define kAppUrl @"http://itunes.apple.com/app/id923676989"
#define kAppReviewURL @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=923676989"
//版本号
#define kVersion_Coding [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
#define kVersionBuild_Coding [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]
//常用变量
#define DebugLog(s, ...) NSLog(@"%s(%d): %@", __FUNCTION__, __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__])
#define kTipAlert(_S_, ...) [[[UIAlertView alloc] initWithTitle:@"提示" message:[NSString stringWithFormat:(_S_), ##__VA_ARGS__] delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil] show]
#define kKeyWindow [UIApplication sharedApplication].keyWindow
#define kHigher_iOS_6_1 (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)
#define kHigher_iOS_6_1_DIS(_X_) ([[NSNumber numberWithBool:kHigher_iOS_6_1] intValue] * _X_)
#define kNotHigher_iOS_6_1_DIS(_X_) (-([[NSNumber numberWithBool:kHigher_iOS_6_1] intValue]-1) * _X_)
#define kDevice_Is_iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define kDevice_Is_iPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)
#define kScreen_Bounds [UIScreen mainScreen].bounds
#define kScreen_Height [UIScreen mainScreen].bounds.size.height
#define kScreen_Width [UIScreen mainScreen].bounds.size.width
#define kPaddingLeftWidth 15.0
#define kLoginPaddingLeftWidth 18.0
#define kMySegmentControl_Height 44.0
#define kMySegmentControlIcon_Height 70.0
#define kBackButtonFontSize 16
#define kNavTitleFontSize 18
#define kBadgeTipStr @"badgeTip"
#define kDefaultLastId [NSNumber numberWithInteger:99999999]
#define kColorNavBG [UIColor colorWithHexString:@"0xFAFAFA"]
#define kColorNavTitle [UIColor colorWithHexString:@"0x323A45"]
#define kColorTableBG [UIColor colorWithHexString:@"0xFFFFFF"]
#define kColorTableSectionBg [UIColor colorWithHexString:@"0xF2F4F6"]
#define kColor222 [UIColor colorWithHexString:@"0x222222"]
#define kColor666 [UIColor colorWithHexString:@"0x666666"]
#define kColor999 [UIColor colorWithHexString:@"0x999999"]
#define kColorDDD [UIColor colorWithHexString:@"0xDDDDDD"]
#define kColorBrandGreen [UIColor colorWithHexString:@"0x3BBD79"]
#define kColorBrandRed [UIColor colorWithHexString:@"0xFF5846"]
#define kPlaceholderMonkeyRoundWidth(_width_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_monkey_round_%.0f", _width_]]
#define kPlaceholderMonkeyRoundView(_view_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_monkey_round_%.0f", CGRectGetWidth(_view_.frame)]]
#define kPlaceholderCodingSquareWidth(_width_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_coding_square_%.0f", _width_]]
#define kPlaceholderCodingSquareView(_view_) [UIImage imageNamed:[NSString stringWithFormat:@"placeholder_coding_square_%.0f", CGRectGetWidth(_view_.frame)]]
#define kScaleFrom_iPhone5_Desgin(_X_) (_X_ * (kScreen_Width/320))
#define kUnReadKey_messages @"messages"
#define kUnReadKey_notifications @"notifications"
#define kUnReadKey_project_update_count @"project_update_count"
#define kUnReadKey_notification_AT @"notification_at"
#define kUnReadKey_notification_Comment @"notification_comment"
#define kUnReadKey_notification_System @"notification_system"
//链接颜色
#define kLinkAttributes @{(__bridge NSString *)kCTUnderlineStyleAttributeName : [NSNumber numberWithBool:NO],(NSString *)kCTForegroundColorAttributeName : (__bridge id)kColorBrandGreen.CGColor}
#define kLinkAttributesActive @{(NSString *)kCTUnderlineStyleAttributeName : [NSNumber numberWithBool:NO],(NSString *)kCTForegroundColorAttributeName : (__bridge id)[[UIColor colorWithHexString:@"0x1b9d59"] CGColor]}
#define kTaskPrioritiesDisplay @[@"有空再看", @"正常处理", @"优先处理", @"十万火急"]
///=============================================
/// @name Weak Object
///=============================================
#pragma mark - Weak Object
/**
* @code
* ESWeak(imageView, weakImageView);
* [self testBlock:^(UIImage *image) {
* ESStrong(weakImageView, strongImageView);
* strongImageView.image = image;
* }];
*
* // `ESWeak_(imageView)` will create a var named `weak_imageView`
* ESWeak_(imageView);
* [self testBlock:^(UIImage *image) {
* ESStrong_(imageView);
* _imageView.image = image;
* }];
*
* // weak `self` and strong `self`
* ESWeakSelf;
* [self testBlock:^(UIImage *image) {
* ESStrongSelf;
* _self.image = image;
* }];
* @endcode
*/
#define ESWeak(var, weakVar) __weak __typeof(&*var) weakVar = var
#define ESStrong_DoNotCheckNil(weakVar, _var) __typeof(&*weakVar) _var = weakVar
#define ESStrong(weakVar, _var) ESStrong_DoNotCheckNil(weakVar, _var); if (!_var) return;
#define ESWeak_(var) ESWeak(var, weak_##var);
#define ESStrong_(var) ESStrong(weak_##var, _##var);
/** defines a weak `self` named `__weakSelf` */
#define ESWeakSelf ESWeak(self, __weakSelf);
/** defines a strong `self` named `_self` from `__weakSelf` */
#define ESStrongSelf ESStrong(__weakSelf, _self);
Morty Proxy This is a proxified and sanitized view of the page, visit original site.