Skip to content

Commit 0826c74

Browse files
committed
initialize commit
1 parent cf6e964 commit 0826c74

28 files changed

+697
-10
lines changed

QFMoudle.xcodeproj/project.pbxproj

Lines changed: 105 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
FD9E1DA9218FD41E009E05A9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DA8218FD41E009E05A9 /* main.m */; };
1616
FD9E1DB3218FD41E009E05A9 /* QFMoudleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DB2218FD41E009E05A9 /* QFMoudleTests.m */; };
1717
FD9E1DBE218FD41E009E05A9 /* QFMoudleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DBD218FD41E009E05A9 /* QFMoudleUITests.m */; };
18+
FD9E1DD1218FD7BA009E05A9 /* QFRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DD0218FD7BA009E05A9 /* QFRouter.m */; };
19+
FD9E1DE1218FDBFA009E05A9 /* MoudleHome.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DDD218FDBFA009E05A9 /* MoudleHome.m */; };
20+
FD9E1DE2218FDBFA009E05A9 /* QFHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DE0218FDBFA009E05A9 /* QFHomeViewController.m */; };
21+
FD9E1DE5218FDC0C009E05A9 /* QFDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DE4218FDC0C009E05A9 /* QFDetailViewController.m */; };
22+
FD9E1DEA218FDC46009E05A9 /* QFMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DE9218FDC46009E05A9 /* QFMeViewController.m */; };
23+
FD9E1DEE218FDC79009E05A9 /* MoudleMe.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9E1DED218FDC79009E05A9 /* MoudleMe.m */; };
1824
/* End PBXBuildFile section */
1925

2026
/* Begin PBXContainerItemProxy section */
@@ -51,6 +57,19 @@
5157
FD9E1DB9218FD41E009E05A9 /* QFMoudleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QFMoudleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5258
FD9E1DBD218FD41E009E05A9 /* QFMoudleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QFMoudleUITests.m; sourceTree = "<group>"; };
5359
FD9E1DBF218FD41E009E05A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
60+
FD9E1DCF218FD7BA009E05A9 /* QFRouter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QFRouter.h; sourceTree = "<group>"; };
61+
FD9E1DD0218FD7BA009E05A9 /* QFRouter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QFRouter.m; sourceTree = "<group>"; };
62+
FD9E1DD3218FD9D0009E05A9 /* QFMoudleProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QFMoudleProtocol.h; sourceTree = "<group>"; };
63+
FD9E1DDC218FDBFA009E05A9 /* MoudleHome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoudleHome.h; sourceTree = "<group>"; };
64+
FD9E1DDD218FDBFA009E05A9 /* MoudleHome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoudleHome.m; sourceTree = "<group>"; };
65+
FD9E1DDF218FDBFA009E05A9 /* QFHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QFHomeViewController.h; sourceTree = "<group>"; };
66+
FD9E1DE0218FDBFA009E05A9 /* QFHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QFHomeViewController.m; sourceTree = "<group>"; };
67+
FD9E1DE3218FDC0C009E05A9 /* QFDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QFDetailViewController.h; sourceTree = "<group>"; };
68+
FD9E1DE4218FDC0C009E05A9 /* QFDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QFDetailViewController.m; sourceTree = "<group>"; };
69+
FD9E1DE8218FDC46009E05A9 /* QFMeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QFMeViewController.h; sourceTree = "<group>"; };
70+
FD9E1DE9218FDC46009E05A9 /* QFMeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QFMeViewController.m; sourceTree = "<group>"; };
71+
FD9E1DEC218FDC79009E05A9 /* MoudleMe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoudleMe.h; sourceTree = "<group>"; };
72+
FD9E1DED218FDC79009E05A9 /* MoudleMe.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MoudleMe.m; sourceTree = "<group>"; };
5473
/* End PBXFileReference section */
5574

5675
/* Begin PBXFrameworksBuildPhase section */
@@ -101,6 +120,10 @@
101120
FD9E1D98218FD41D009E05A9 /* QFMoudle */ = {
102121
isa = PBXGroup;
103122
children = (
123+
FD9E1DDA218FDBFA009E05A9 /* QFHome */,
124+
FD9E1DCE218FD7A2009E05A9 /* QFMe */,
125+
FD9E1DCC218FD7A2009E05A9 /* QFProtocol */,
126+
FD9E1DCD218FD7A2009E05A9 /* QFRouter */,
104127
FD9E1D99218FD41D009E05A9 /* AppDelegate.h */,
105128
FD9E1D9A218FD41D009E05A9 /* AppDelegate.m */,
106129
FD9E1D9C218FD41D009E05A9 /* ViewController.h */,
@@ -132,6 +155,79 @@
132155
path = QFMoudleUITests;
133156
sourceTree = "<group>";
134157
};
158+
FD9E1DCC218FD7A2009E05A9 /* QFProtocol */ = {
159+
isa = PBXGroup;
160+
children = (
161+
FD9E1DD3218FD9D0009E05A9 /* QFMoudleProtocol.h */,
162+
);
163+
path = QFProtocol;
164+
sourceTree = "<group>";
165+
};
166+
FD9E1DCD218FD7A2009E05A9 /* QFRouter */ = {
167+
isa = PBXGroup;
168+
children = (
169+
FD9E1DCF218FD7BA009E05A9 /* QFRouter.h */,
170+
FD9E1DD0218FD7BA009E05A9 /* QFRouter.m */,
171+
);
172+
path = QFRouter;
173+
sourceTree = "<group>";
174+
};
175+
FD9E1DCE218FD7A2009E05A9 /* QFMe */ = {
176+
isa = PBXGroup;
177+
children = (
178+
FD9E1DE6218FDC3A009E05A9 /* Moudle */,
179+
FD9E1DE7218FDC3A009E05A9 /* Controller */,
180+
);
181+
path = QFMe;
182+
sourceTree = "<group>";
183+
};
184+
FD9E1DDA218FDBFA009E05A9 /* QFHome */ = {
185+
isa = PBXGroup;
186+
children = (
187+
FD9E1DDB218FDBFA009E05A9 /* Module */,
188+
FD9E1DDE218FDBFA009E05A9 /* Controller */,
189+
);
190+
path = QFHome;
191+
sourceTree = "<group>";
192+
};
193+
FD9E1DDB218FDBFA009E05A9 /* Module */ = {
194+
isa = PBXGroup;
195+
children = (
196+
FD9E1DDC218FDBFA009E05A9 /* MoudleHome.h */,
197+
FD9E1DDD218FDBFA009E05A9 /* MoudleHome.m */,
198+
);
199+
path = Module;
200+
sourceTree = "<group>";
201+
};
202+
FD9E1DDE218FDBFA009E05A9 /* Controller */ = {
203+
isa = PBXGroup;
204+
children = (
205+
FD9E1DDF218FDBFA009E05A9 /* QFHomeViewController.h */,
206+
FD9E1DE0218FDBFA009E05A9 /* QFHomeViewController.m */,
207+
FD9E1DE3218FDC0C009E05A9 /* QFDetailViewController.h */,
208+
FD9E1DE4218FDC0C009E05A9 /* QFDetailViewController.m */,
209+
);
210+
path = Controller;
211+
sourceTree = "<group>";
212+
};
213+
FD9E1DE6218FDC3A009E05A9 /* Moudle */ = {
214+
isa = PBXGroup;
215+
children = (
216+
FD9E1DEC218FDC79009E05A9 /* MoudleMe.h */,
217+
FD9E1DED218FDC79009E05A9 /* MoudleMe.m */,
218+
);
219+
path = Moudle;
220+
sourceTree = "<group>";
221+
};
222+
FD9E1DE7218FDC3A009E05A9 /* Controller */ = {
223+
isa = PBXGroup;
224+
children = (
225+
FD9E1DE8218FDC46009E05A9 /* QFMeViewController.h */,
226+
FD9E1DE9218FDC46009E05A9 /* QFMeViewController.m */,
227+
);
228+
path = Controller;
229+
sourceTree = "<group>";
230+
};
135231
/* End PBXGroup section */
136232

137233
/* Begin PBXNativeTarget section */
@@ -194,6 +290,7 @@
194290
FD9E1D8E218FD41C009E05A9 /* Project object */ = {
195291
isa = PBXProject;
196292
attributes = {
293+
CLASSPREFIX = QF;
197294
LastUpgradeCheck = 0940;
198295
ORGANIZATIONNAME = qingfengiOS;
199296
TargetAttributes = {
@@ -262,9 +359,15 @@
262359
isa = PBXSourcesBuildPhase;
263360
buildActionMask = 2147483647;
264361
files = (
362+
FD9E1DE5218FDC0C009E05A9 /* QFDetailViewController.m in Sources */,
363+
FD9E1DE2218FDBFA009E05A9 /* QFHomeViewController.m in Sources */,
265364
FD9E1D9E218FD41D009E05A9 /* ViewController.m in Sources */,
365+
FD9E1DD1218FD7BA009E05A9 /* QFRouter.m in Sources */,
266366
FD9E1DA9218FD41E009E05A9 /* main.m in Sources */,
267367
FD9E1D9B218FD41D009E05A9 /* AppDelegate.m in Sources */,
368+
FD9E1DE1218FDBFA009E05A9 /* MoudleHome.m in Sources */,
369+
FD9E1DEA218FDC46009E05A9 /* QFMeViewController.m in Sources */,
370+
FD9E1DEE218FDC79009E05A9 /* MoudleMe.m in Sources */,
268371
);
269372
runOnlyForDeploymentPostprocessing = 0;
270373
};
@@ -440,7 +543,7 @@
440543
"$(inherited)",
441544
"@executable_path/Frameworks",
442545
);
443-
PRODUCT_BUNDLE_IDENTIFIER = com.shanglv51.www.QFMoudle;
546+
PRODUCT_BUNDLE_IDENTIFIER = com.qingfengiOS.www.QFMoudle;
444547
PRODUCT_NAME = "$(TARGET_NAME)";
445548
TARGETED_DEVICE_FAMILY = "1,2";
446549
};
@@ -457,7 +560,7 @@
457560
"$(inherited)",
458561
"@executable_path/Frameworks",
459562
);
460-
PRODUCT_BUNDLE_IDENTIFIER = com.shanglv51.www.QFMoudle;
563+
PRODUCT_BUNDLE_IDENTIFIER = com.qingfengiOS.www.QFMoudle;
461564
PRODUCT_NAME = "$(TARGET_NAME)";
462565
TARGETED_DEVICE_FAMILY = "1,2";
463566
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
</Bucket>

QFMoudle/AppDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// AppDelegate.h
33
// QFMoudle
44
//
5-
// Created by 李一平 on 2018/11/5.
5+
// Created by 情风 on 2018/11/5.
66
// Copyright © 2018年 qingfengiOS. All rights reserved.
77
//
88

QFMoudle/AppDelegate.m

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
// AppDelegate.m
33
// QFMoudle
44
//
5-
// Created by 李一平 on 2018/11/5.
5+
// Created by 情风 on 2018/11/5.
66
// Copyright © 2018年 qingfengiOS. All rights reserved.
77
//
88

99
#import "AppDelegate.h"
10+
#import "QFRouter.h"
11+
#import "QFMoudleProtocol.h"
1012

1113
@interface AppDelegate ()
1214

@@ -16,7 +18,38 @@ @implementation AppDelegate
1618

1719

1820
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19-
// Override point for customization after application launch.
21+
22+
/*
23+
测试一个严谨的单例,需要重写alloc copy mutableCopy方法
24+
*/
25+
QFRouter *r1 = [QFRouter router];
26+
QFRouter *r2 = [[QFRouter alloc]init];
27+
QFRouter *r3 = [r1 copy];
28+
QFRouter *r4 = [r1 mutableCopy];
29+
NSLog(@"\n%p\n%@\n%@\n%@",r1,r2,r3,r4);
30+
31+
// Home组件
32+
id <MoudleHome>homeMoudle = [[QFRouter router]interfaceForProtocol:@protocol(MoudleHome)];
33+
homeMoudle.paramterForHome = @"MoudleHome";
34+
UIViewController *homeViewController = homeMoudle.interfaceViewController;
35+
UINavigationController *homeNavi = [[UINavigationController alloc]initWithRootViewController:homeViewController];
36+
homeNavi.tabBarItem.title = @"首页";
37+
homeNavi.tabBarItem.image = [UIImage imageNamed:@"home"];
38+
39+
// Me组件
40+
id <MoudleMe>meMoudle = [[QFRouter router]interfaceForURL:[NSURL URLWithString:@"MoudleMe://?paramterForMe=ModuleMe"]];
41+
UIViewController *meViewConterller = meMoudle.interfaceViewController;
42+
UINavigationController *meNavi = [[UINavigationController alloc]initWithRootViewController:meViewConterller];
43+
meNavi.tabBarItem.title = @"个人";
44+
meNavi.tabBarItem.image = [UIImage imageNamed:@"me"];
45+
46+
// tabbr和window
47+
UITabBarController *tabbarController = [[UITabBarController alloc]init];
48+
tabbarController.viewControllers = @[homeNavi,meNavi];
49+
_window.rootViewController = tabbarController;
50+
_window.backgroundColor = [UIColor whiteColor];
51+
[_window makeKeyAndVisible];
52+
2053
return YES;
2154
}
2255

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "universal",
9+
"filename" : "[email protected]",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"filename" : "[email protected]",
15+
"scale" : "3x"
16+
}
17+
],
18+
"info" : {
19+
"version" : 1,
20+
"author" : "xcode"
21+
}
22+
}
Loading
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "universal",
9+
"filename" : "[email protected]",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"filename" : "[email protected]",
15+
"scale" : "3x"
16+
}
17+
],
18+
"info" : {
19+
"version" : 1,
20+
"author" : "xcode"
21+
}
22+
}
Loading
Loading

0 commit comments

Comments
 (0)