中介者模式完成 · fei1990/Design-Pattern-For-iOS@bb1cd44 · GitHub
Skip to content

Commit bb1cd44

Browse files
committed
中介者模式完成
1 parent b0791e8 commit bb1cd44

18 files changed

Lines changed: 384 additions & 4 deletions

File tree

20中介者模式/20中介者模式.xcodeproj/project.pbxproj

Lines changed: 44 additions & 0 deletions

20中介者模式/20中介者模式.xcodeproj/project.xcworkspace/xcshareddata/20中介者模式.xccheckout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
<key>IDESourceControlProjectIdentifier</key>
88
<string>E16ECFE3-8D86-45F0-86C5-F69EF44A59B4</string>
99
<key>IDESourceControlProjectName</key>
10-
<string>project</string>
10+
<string>20中介者模式</string>
1111
<key>IDESourceControlProjectOriginsDictionary</key>
1212
<dict>
1313
<key>97B4AD1D63A96A3E6D01F6FF529543E2092CC1C1</key>
1414
<string>https://github.com/huang303513/Design-Pattern-For-iOS.git</string>
1515
</dict>
1616
<key>IDESourceControlProjectPath</key>
17-
<string>20中介者模式/20中介者模式.xcodeproj/project.xcworkspace</string>
17+
<string>20中介者模式/20中介者模式.xcodeproj</string>
1818
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
1919
<dict>
2020
<key>97B4AD1D63A96A3E6D01F6FF529543E2092CC1C1</key>
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0640"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "DD2D696A1B7F409900F9E848"
18+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.app"
19+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;"
20+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "DD2D69831B7F409A00F9E848"
32+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;Tests.xctest"
33+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;Tests"
34+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42+
shouldUseLaunchSchemeArgsEnv = "YES"
43+
buildConfiguration = "Debug">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "DD2D69831B7F409A00F9E848"
50+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;Tests.xctest"
51+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;Tests"
52+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "DD2D696A1B7F409900F9E848"
60+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.app"
61+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;"
62+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
</TestAction>
66+
<LaunchAction
67+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
68+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
69+
launchStyle = "0"
70+
useCustomWorkingDirectory = "NO"
71+
buildConfiguration = "Debug"
72+
ignoresPersistentStateOnLaunch = "NO"
73+
debugDocumentVersioning = "YES"
74+
allowLocationSimulation = "YES">
75+
<BuildableProductRunnable
76+
runnableDebuggingMode = "0">
77+
<BuildableReference
78+
BuildableIdentifier = "primary"
79+
BlueprintIdentifier = "DD2D696A1B7F409900F9E848"
80+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.app"
81+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;"
82+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
83+
</BuildableReference>
84+
</BuildableProductRunnable>
85+
<AdditionalOptions>
86+
</AdditionalOptions>
87+
</LaunchAction>
88+
<ProfileAction
89+
shouldUseLaunchSchemeArgsEnv = "YES"
90+
savedToolIdentifier = ""
91+
useCustomWorkingDirectory = "NO"
92+
buildConfiguration = "Release"
93+
debugDocumentVersioning = "YES">
94+
<BuildableProductRunnable
95+
runnableDebuggingMode = "0">
96+
<BuildableReference
97+
BuildableIdentifier = "primary"
98+
BlueprintIdentifier = "DD2D696A1B7F409900F9E848"
99+
BuildableName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.app"
100+
BlueprintName = "20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;"
101+
ReferencedContainer = "container:20&#x4e2d;&#x4ecb;&#x8005;&#x6a21;&#x5f0f;.xcodeproj">
102+
</BuildableReference>
103+
</BuildableProductRunnable>
104+
</ProfileAction>
105+
<AnalyzeAction
106+
buildConfiguration = "Debug">
107+
</AnalyzeAction>
108+
<ArchiveAction
109+
buildConfiguration = "Release"
110+
revealArchiveInOrganizer = "YES">
111+
</ArchiveAction>
112+
</Scheme>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>20中介者模式.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>DD2D696A1B7F409900F9E848</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
<key>DD2D69831B7F409A00F9E848</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
</dict>
26+
</dict>
27+
</plist>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// HCDAbstractColleague.h
3+
// 20中介者模式
4+
//
5+
// Created by 黄成都 on 15/8/26.
6+
// Copyright (c) 2015年 黄成都. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <UIKit/UIKit.h>
11+
@class HCDAbstractMediator;
12+
@interface HCDAbstractColleague : NSObject
13+
@property(nonatomic,assign)CGFloat number;
14+
-(void)notice;
15+
@property(nonatomic,strong) HCDAbstractMediator *mediator;
16+
@end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// HCDAbstractColleague.m
3+
// 20中介者模式
4+
//
5+
// Created by 黄成都 on 15/8/26.
6+
// Copyright (c) 2015年 黄成都. All rights reserved.
7+
//
8+
9+
#import "HCDAbstractColleague.h"
10+
#import "HCDAbstractMediator.h"
11+
@implementation HCDAbstractColleague
12+
13+
@end
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// HCDAbstractMediator.h
3+
// 20中介者模式
4+
//
5+
// Created by 黄成都 on 15/8/26.
6+
// Copyright (c) 2015年 黄成都. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "HCDColleagueB.h"
11+
#import "HCDColleagueA.h"
12+
@interface HCDAbstractMediator : NSObject
13+
-(instancetype)initWithColleagueA:(HCDAbstractColleague *)colleagueA colleagueB:(HCDAbstractColleague *)colleagueB;
14+
@property(nonatomic,weak)HCDAbstractColleague *colleagueA;
15+
@property(nonatomic,weak)HCDAbstractColleague *colleagueB;
16+
-(void)setValueToColleagueA:(CGFloat)value;
17+
-(void)setValueToColleagueB:(CGFloat)value;
18+
@end
19+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// HCDAbstractMediator.m
3+
// 20中介者模式
4+
//
5+
// Created by 黄成都 on 15/8/26.
6+
// Copyright (c) 2015年 黄成都. All rights reserved.
7+
//
8+
9+
#import "HCDAbstractMediator.h"
10+
11+
@implementation HCDAbstractMediator
12+
13+
@end
Lines changed: 13 additions & 0 deletions

0 commit comments

Comments
 (0)