Skip to content

Commit 32b52bd

Browse files
committed
1、将 QMUIConfigurationTemplate 挪出来到单独的目录,为 CocoaPod 准备;2、为配置模板里的所有项目增加作用说明
1 parent c4d5e7f commit 32b52bd

7 files changed

Lines changed: 157 additions & 170 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// QMUIConfigurationTemplate.h
3+
//
4+
// Created by QQMail on 15/3/29.
5+
// Copyright (c) 2015年 QMUI Team. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
/**
11+
* QMUIConfigurationTemplate 是一份配置表,用于配合 QMUIKit 来管理整个 App 的全局样式,使用方式如下:
12+
* 1. 在 QMUI 项目代码的文件夹里找到 QMUIConfigurationTemplate 目录,把里面所有文件复制到自己项目里。
13+
* 2. 在自己项目的 AppDelegate 里 #import "QMUIConfigurationTemplate.h",然后在 application:didFinishLaunchingWithOptions: 里调用 [QMUIConfigurationTemplate setupConfigurationTemplate],即可让配置表生效。
14+
* 3. 默认情况下配置表里的所有赋值都被注释,表示使用 QMUI 的默认值,你可以把你想修改的表达式取消注释,并改为想要的值即可。
15+
* 4. 注意如果修改了属性 A,则请搜索整个文件里所有用到 A 的地方,把那个地方的注释也打开,否则使用的是 A 在 QMUI 里的默认值,而不是你修改后的值。
16+
* 5. 更新 QMUIKit 的版本时,请留意 Release Log 里是否有提醒更新配置表,请尽量保持自己项目里的配置表与 QMUIKit 里的配置表一致,避免遗漏新的属性。
17+
*/
18+
@interface QMUIConfigurationTemplate : NSObject
19+
20+
+ (void)setupConfigurationTemplate;
21+
22+
@end

QMUIKit/UICommon/QMUIConfigurationTemplate.m renamed to QMUIConfigurationTemplate/QMUIConfigurationTemplate.m

Lines changed: 121 additions & 134 deletions
Large diffs are not rendered by default.

QMUIKit/UICommon/QMUIConfiguration.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@
182182

183183
#pragma mark - UIWindowLevel
184184
#define UIWindowLevelQMUIAlertView [QMUICMI windowLevelQMUIAlertView]
185-
#define UIWindowLevelQMUIActionSheet [QMUICMI windowLevelQMUIActionSheet]
186-
#define UIWindowLevelQMUIMoreOperationController [QMUICMI windowLevelQMUIMoreOperationController]
187185
#define UIWindowLevelQMUIImagePreviewView [QMUICMI windowLevelQMUIImagePreviewView]
188186

189187
#pragma mark - Others

QMUIKit/UICommon/QMUIConfigurationManager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ NS_ASSUME_NONNULL_BEGIN
167167
#pragma mark - UIWindowLevel
168168

169169
@property(nonatomic, assign) CGFloat windowLevelQMUIAlertView;
170-
@property(nonatomic, assign) CGFloat windowLevelQMUIActionSheet;
171-
@property(nonatomic, assign) CGFloat windowLevelQMUIMoreOperationController;
172170
@property(nonatomic, assign) CGFloat windowLevelQMUIImagePreviewView;
173171

174172
#pragma mark - Others

QMUIKit/UICommon/QMUIConfigurationManager.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ - (void)initDefaultConfiguration {
186186

187187
#pragma mark - UIWindowLevel
188188
self.windowLevelQMUIAlertView = UIWindowLevelAlert - 4.0;
189-
self.windowLevelQMUIActionSheet = UIWindowLevelAlert - 4.0;
190-
self.windowLevelQMUIMoreOperationController = UIWindowLevelStatusBar + 1;
191189
self.windowLevelQMUIImagePreviewView = UIWindowLevelStatusBar + 1;
192190

193191
#pragma mark - Others

QMUIKit/UICommon/QMUIConfigurationTemplate.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

qmui.xcodeproj/project.pbxproj

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@
283283
CD44C1D81956D5970098D0A2 /* QMUIAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QMUIAppDelegate.m; sourceTree = "<group>"; };
284284
CD44C1DA1956D5970098D0A2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
285285
CD44C1E11956D5970098D0A2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
286+
CD4DA9C01E8E3B0500836A1A /* QMUIConfigurationTemplate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QMUIConfigurationTemplate.h; sourceTree = "<group>"; };
287+
CD4DA9C11E8E3B0500836A1A /* QMUIConfigurationTemplate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QMUIConfigurationTemplate.m; sourceTree = "<group>"; };
286288
CD78CBC81DEE9D6300910DCE /* QMUIImagePreviewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMUIImagePreviewViewController.h; sourceTree = "<group>"; };
287289
CD78CBC91DEE9D6300910DCE /* QMUIImagePreviewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMUIImagePreviewViewController.m; sourceTree = "<group>"; };
288290
CD78CBCD1DEE9E3500910DCE /* QMUIImagePreviewView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMUIImagePreviewView.h; sourceTree = "<group>"; };
@@ -459,10 +461,11 @@
459461
CD44C1BC1956D5970098D0A2 = {
460462
isa = PBXGroup;
461463
children = (
462-
CDB8CA2D1DCC870700769DF0 /* QMUIKit */,
463-
CD44C1CE1956D5970098D0A2 /* qmui */,
464464
CD44C1C71956D5970098D0A2 /* Frameworks */,
465465
CD44C1C61956D5970098D0A2 /* Products */,
466+
CD44C1CE1956D5970098D0A2 /* qmui */,
467+
CD4DA9BF1E8E3B0500836A1A /* QMUIConfigurationTemplate */,
468+
CDB8CA2D1DCC870700769DF0 /* QMUIKit */,
466469
);
467470
sourceTree = "<group>";
468471
};
@@ -511,6 +514,15 @@
511514
name = "Supporting Files";
512515
sourceTree = "<group>";
513516
};
517+
CD4DA9BF1E8E3B0500836A1A /* QMUIConfigurationTemplate */ = {
518+
isa = PBXGroup;
519+
children = (
520+
CD4DA9C01E8E3B0500836A1A /* QMUIConfigurationTemplate.h */,
521+
CD4DA9C11E8E3B0500836A1A /* QMUIConfigurationTemplate.m */,
522+
);
523+
path = QMUIConfigurationTemplate;
524+
sourceTree = "<group>";
525+
};
514526
CDB8CA2D1DCC870700769DF0 /* QMUIKit */ = {
515527
isa = PBXGroup;
516528
children = (
@@ -532,8 +544,6 @@
532544
CDB8CA351DCC870700769DF0 /* QMUIConfiguration.h */,
533545
CDB8CA361DCC870700769DF0 /* QMUIConfigurationManager.h */,
534546
CDB8CA371DCC870700769DF0 /* QMUIConfigurationManager.m */,
535-
CDB8CA381DCC870700769DF0 /* QMUIConfigurationTemplate.h */,
536-
CDB8CA391DCC870700769DF0 /* QMUIConfigurationTemplate.m */,
537547
CDB8CA3A1DCC870700769DF0 /* QMUIHelper.h */,
538548
CDB8CA3B1DCC870700769DF0 /* QMUIHelper.m */,
539549
);

0 commit comments

Comments
 (0)