Skip to content

Commit

Permalink
各种模式
Browse files Browse the repository at this point in the history
  • Loading branch information
link committed Mar 29, 2021
1 parent 78e6607 commit b686038
Show file tree
Hide file tree
Showing 69 changed files with 3,018 additions and 570 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>0-2 协议.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
<integer>8</integer>
</dict>
</dict>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
3BCB1BC82594340700F19DBF /* 1-简单工厂模式 */ = {
isa = PBXGroup;
children = (
019FEBB82606E91B0062F3A2 /* 3.0 */,
3B32122025B7CF29007FB058 /* 1.0 */,
013562CD2606349D00A1BB15 /* 2.0 */,
019FEBB82606E91B0062F3A2 /* 3.0 */,
3BCB1BC92594340700F19DBF /* main.swift */,
3BFD5AFA25AED94800AA1846 /* InputManager.swift */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>1-简单工厂模式.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
149280942328976F001CAD44 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 149280932328976F001CAD44 /* main.m */; };
1492809D23289A62001CAD44 /* AnimalFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 1492809C23289A62001CAD44 /* AnimalFactory.m */; };
149280A023289BA2001CAD44 /* Cat.m in Sources */ = {isa = PBXBuildFile; fileRef = 1492809F23289BA2001CAD44 /* Cat.m */; };
149280A323289C6F001CAD44 /* Dog.m in Sources */ = {isa = PBXBuildFile; fileRef = 149280A223289C6F001CAD44 /* Dog.m */; };
149280A623289EE5001CAD44 /* Animal.m in Sources */ = {isa = PBXBuildFile; fileRef = 149280A523289EE5001CAD44 /* Animal.m */; };
01FB5C762611D518007D3685 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01FB5C752611D518007D3685 /* main.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
1492808E2328976F001CAD44 /* CopyFiles */ = {
01FB5C702611D518007D3685 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
Expand All @@ -27,21 +23,12 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
149280902328976F001CAD44 /* 工厂模式(Factory Pattern) */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "工厂模式(Factory Pattern)"; sourceTree = BUILT_PRODUCTS_DIR; };
149280932328976F001CAD44 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
1492809A232899F9001CAD44 /* AnimalProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimalProtocol.h; sourceTree = "<group>"; };
1492809B23289A62001CAD44 /* AnimalFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimalFactory.h; sourceTree = "<group>"; };
1492809C23289A62001CAD44 /* AnimalFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimalFactory.m; sourceTree = "<group>"; };
1492809E23289BA2001CAD44 /* Cat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cat.h; sourceTree = "<group>"; };
1492809F23289BA2001CAD44 /* Cat.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Cat.m; sourceTree = "<group>"; };
149280A123289C6F001CAD44 /* Dog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Dog.h; sourceTree = "<group>"; };
149280A223289C6F001CAD44 /* Dog.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Dog.m; sourceTree = "<group>"; };
149280A423289EE5001CAD44 /* Animal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Animal.h; sourceTree = "<group>"; };
149280A523289EE5001CAD44 /* Animal.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Animal.m; sourceTree = "<group>"; };
01FB5C722611D518007D3685 /* 10-观察者模式 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "10-观察者模式"; sourceTree = BUILT_PRODUCTS_DIR; };
01FB5C752611D518007D3685 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1492808D2328976F001CAD44 /* Frameworks */ = {
01FB5C6F2611D518007D3685 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -51,107 +38,95 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
149280872328976F001CAD44 = {
01FB5C692611D518007D3685 = {
isa = PBXGroup;
children = (
149280922328976F001CAD44 /* 工厂模式(Factory Pattern) */,
149280912328976F001CAD44 /* Products */,
01FB5C742611D518007D3685 /* 10-观察者模式 */,
01FB5C732611D518007D3685 /* Products */,
);
sourceTree = "<group>";
};
149280912328976F001CAD44 /* Products */ = {
01FB5C732611D518007D3685 /* Products */ = {
isa = PBXGroup;
children = (
149280902328976F001CAD44 /* 工厂模式(Factory Pattern) */,
01FB5C722611D518007D3685 /* 10-观察者模式 */,
);
name = Products;
sourceTree = "<group>";
};
149280922328976F001CAD44 /* 工厂模式(Factory Pattern) */ = {
01FB5C742611D518007D3685 /* 10-观察者模式 */ = {
isa = PBXGroup;
children = (
149280932328976F001CAD44 /* main.m */,
1492809A232899F9001CAD44 /* AnimalProtocol.h */,
149280A423289EE5001CAD44 /* Animal.h */,
149280A523289EE5001CAD44 /* Animal.m */,
1492809E23289BA2001CAD44 /* Cat.h */,
1492809F23289BA2001CAD44 /* Cat.m */,
149280A123289C6F001CAD44 /* Dog.h */,
149280A223289C6F001CAD44 /* Dog.m */,
1492809B23289A62001CAD44 /* AnimalFactory.h */,
1492809C23289A62001CAD44 /* AnimalFactory.m */,
01FB5C752611D518007D3685 /* main.swift */,
);
path = "工厂模式(Factory Pattern)";
path = "10-观察者模式";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
1492808F2328976F001CAD44 /* 工厂模式(Factory Pattern) */ = {
01FB5C712611D518007D3685 /* 10-观察者模式 */ = {
isa = PBXNativeTarget;
buildConfigurationList = 149280972328976F001CAD44 /* Build configuration list for PBXNativeTarget "工厂模式(Factory Pattern)" */;
buildConfigurationList = 01FB5C792611D518007D3685 /* Build configuration list for PBXNativeTarget "10-观察者模式" */;
buildPhases = (
1492808C2328976F001CAD44 /* Sources */,
1492808D2328976F001CAD44 /* Frameworks */,
1492808E2328976F001CAD44 /* CopyFiles */,
01FB5C6E2611D518007D3685 /* Sources */,
01FB5C6F2611D518007D3685 /* Frameworks */,
01FB5C702611D518007D3685 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = "工厂模式(Factory Pattern)";
productName = "工厂模式(Factory Pattern)";
productReference = 149280902328976F001CAD44 /* 工厂模式(Factory Pattern) */;
name = "10-观察者模式";
productName = "10-观察者模式";
productReference = 01FB5C722611D518007D3685 /* 10-观察者模式 */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
149280882328976F001CAD44 /* Project object */ = {
01FB5C6A2611D518007D3685 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = Link;
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1240;
TargetAttributes = {
1492808F2328976F001CAD44 = {
CreatedOnToolsVersion = 10.3;
01FB5C712611D518007D3685 = {
CreatedOnToolsVersion = 12.4;
};
};
};
buildConfigurationList = 1492808B2328976F001CAD44 /* Build configuration list for PBXProject "工厂模式(Factory Pattern)" */;
buildConfigurationList = 01FB5C6D2611D518007D3685 /* Build configuration list for PBXProject "10-观察者模式" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 149280872328976F001CAD44;
productRefGroup = 149280912328976F001CAD44 /* Products */;
mainGroup = 01FB5C692611D518007D3685;
productRefGroup = 01FB5C732611D518007D3685 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
1492808F2328976F001CAD44 /* 工厂模式(Factory Pattern) */,
01FB5C712611D518007D3685 /* 10-观察者模式 */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
1492808C2328976F001CAD44 /* Sources */ = {
01FB5C6E2611D518007D3685 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
149280A023289BA2001CAD44 /* Cat.m in Sources */,
1492809D23289A62001CAD44 /* AnimalFactory.m in Sources */,
149280A623289EE5001CAD44 /* Animal.m in Sources */,
149280A323289C6F001CAD44 /* Dog.m in Sources */,
149280942328976F001CAD44 /* main.m in Sources */,
01FB5C762611D518007D3685 /* main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
149280952328976F001CAD44 /* Debug */ = {
01FB5C772611D518007D3685 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
Expand All @@ -177,13 +152,13 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -202,15 +177,17 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
149280962328976F001CAD44 /* Release */ = {
01FB5C782611D518007D3685 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
Expand All @@ -236,13 +213,13 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -255,53 +232,55 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = Release;
};
149280982328976F001CAD44 /* Debug */ = {
01FB5C7A2611D518007D3685 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 9H7JFCV9B8;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
149280992328976F001CAD44 /* Release */ = {
01FB5C7B2611D518007D3685 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 9H7JFCV9B8;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1492808B2328976F001CAD44 /* Build configuration list for PBXProject "工厂模式(Factory Pattern)" */ = {
01FB5C6D2611D518007D3685 /* Build configuration list for PBXProject "10-观察者模式" */ = {
isa = XCConfigurationList;
buildConfigurations = (
149280952328976F001CAD44 /* Debug */,
149280962328976F001CAD44 /* Release */,
01FB5C772611D518007D3685 /* Debug */,
01FB5C782611D518007D3685 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
149280972328976F001CAD44 /* Build configuration list for PBXNativeTarget "工厂模式(Factory Pattern)" */ = {
01FB5C792611D518007D3685 /* Build configuration list for PBXNativeTarget "10-观察者模式" */ = {
isa = XCConfigurationList;
buildConfigurations = (
149280982328976F001CAD44 /* Debug */,
149280992328976F001CAD44 /* Release */,
01FB5C7A2611D518007D3685 /* Debug */,
01FB5C7B2611D518007D3685 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 149280882328976F001CAD44 /* Project object */;
rootObject = 01FB5C6A2611D518007D3685 /* Project object */;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>工厂模式(Factory Pattern).xcscheme_^#shared#^_</key>
<key>10-观察者模式.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<integer>11</integer>
</dict>
</dict>
</dict>
Expand Down
11 changes: 11 additions & 0 deletions 10-观察者模式/10-观察者模式/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// main.swift
// 10-观察者模式
//
// Created by sengshuaibin on 2021/3/29.
//

import Foundation

print("Hello, World!")

Loading

0 comments on commit b686038

Please sign in to comment.