Skip to content

Commit

Permalink
添加单例模式
Browse files Browse the repository at this point in the history
  • Loading branch information
BeyondVincent committed May 9, 2013
1 parent e3d0881 commit 8a7ef9d
Show file tree
Hide file tree
Showing 23 changed files with 855 additions and 0 deletions.
Binary file added SingletonPattern/SingletonPattern/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
DF0E4473173B837B00C6D279 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0E4472173B837B00C6D279 /* UIKit.framework */; };
DF0E4475173B837B00C6D279 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0E4474173B837B00C6D279 /* Foundation.framework */; };
DF0E4477173B837B00C6D279 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0E4476173B837B00C6D279 /* CoreGraphics.framework */; };
DF0E447D173B837B00C6D279 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DF0E447B173B837B00C6D279 /* InfoPlist.strings */; };
DF0E447F173B837B00C6D279 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0E447E173B837B00C6D279 /* main.m */; };
DF0E4483173B837B00C6D279 /* BVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0E4482173B837B00C6D279 /* BVAppDelegate.m */; };
DF0E4485173B837B00C6D279 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = DF0E4484173B837B00C6D279 /* Default.png */; };
DF0E4487173B837B00C6D279 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = DF0E4486173B837B00C6D279 /* [email protected] */; };
DF0E4489173B837B00C6D279 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = DF0E4488173B837B00C6D279 /* [email protected] */; };
DF0E448C173B837B00C6D279 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DF0E448A173B837B00C6D279 /* MainStoryboard.storyboard */; };
DF0E448F173B837B00C6D279 /* BVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0E448E173B837B00C6D279 /* BVViewController.m */; };
DF0E4497173B83DC00C6D279 /* BVNonARCSingleton.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0E4496173B83DC00C6D279 /* BVNonARCSingleton.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
DF0E449A173B8D3B00C6D279 /* BVARCSingleton.m in Sources */ = {isa = PBXBuildFile; fileRef = DF0E4499173B8D3B00C6D279 /* BVARCSingleton.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
DF0E446F173B837B00C6D279 /* SingletonPattern.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SingletonPattern.app; sourceTree = BUILT_PRODUCTS_DIR; };
DF0E4472173B837B00C6D279 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
DF0E4474173B837B00C6D279 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
DF0E4476173B837B00C6D279 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
DF0E447A173B837B00C6D279 /* SingletonPattern-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SingletonPattern-Info.plist"; sourceTree = "<group>"; };
DF0E447C173B837B00C6D279 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DF0E447E173B837B00C6D279 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
DF0E4480173B837B00C6D279 /* SingletonPattern-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SingletonPattern-Prefix.pch"; sourceTree = "<group>"; };
DF0E4481173B837B00C6D279 /* BVAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BVAppDelegate.h; sourceTree = "<group>"; };
DF0E4482173B837B00C6D279 /* BVAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BVAppDelegate.m; sourceTree = "<group>"; };
DF0E4484173B837B00C6D279 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
DF0E4486173B837B00C6D279 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
DF0E4488173B837B00C6D279 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
DF0E448B173B837B00C6D279 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; };
DF0E448D173B837B00C6D279 /* BVViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BVViewController.h; sourceTree = "<group>"; };
DF0E448E173B837B00C6D279 /* BVViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BVViewController.m; sourceTree = "<group>"; };
DF0E4495173B83DC00C6D279 /* BVNonARCSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BVNonARCSingleton.h; sourceTree = "<group>"; };
DF0E4496173B83DC00C6D279 /* BVNonARCSingleton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BVNonARCSingleton.m; sourceTree = "<group>"; };
DF0E4498173B8D3B00C6D279 /* BVARCSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BVARCSingleton.h; sourceTree = "<group>"; };
DF0E4499173B8D3B00C6D279 /* BVARCSingleton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BVARCSingleton.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
DF0E446C173B837B00C6D279 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DF0E4473173B837B00C6D279 /* UIKit.framework in Frameworks */,
DF0E4475173B837B00C6D279 /* Foundation.framework in Frameworks */,
DF0E4477173B837B00C6D279 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
DF0E4466173B837B00C6D279 = {
isa = PBXGroup;
children = (
DF0E4478173B837B00C6D279 /* SingletonPattern */,
DF0E4471173B837B00C6D279 /* Frameworks */,
DF0E4470173B837B00C6D279 /* Products */,
);
sourceTree = "<group>";
};
DF0E4470173B837B00C6D279 /* Products */ = {
isa = PBXGroup;
children = (
DF0E446F173B837B00C6D279 /* SingletonPattern.app */,
);
name = Products;
sourceTree = "<group>";
};
DF0E4471173B837B00C6D279 /* Frameworks */ = {
isa = PBXGroup;
children = (
DF0E4472173B837B00C6D279 /* UIKit.framework */,
DF0E4474173B837B00C6D279 /* Foundation.framework */,
DF0E4476173B837B00C6D279 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
DF0E4478173B837B00C6D279 /* SingletonPattern */ = {
isa = PBXGroup;
children = (
DF0E4479173B837B00C6D279 /* Supporting Files */,
DF0E4495173B83DC00C6D279 /* BVNonARCSingleton.h */,
DF0E4496173B83DC00C6D279 /* BVNonARCSingleton.m */,
DF0E4498173B8D3B00C6D279 /* BVARCSingleton.h */,
DF0E4499173B8D3B00C6D279 /* BVARCSingleton.m */,
);
path = SingletonPattern;
sourceTree = "<group>";
};
DF0E4479173B837B00C6D279 /* Supporting Files */ = {
isa = PBXGroup;
children = (
DF0E4481173B837B00C6D279 /* BVAppDelegate.h */,
DF0E4482173B837B00C6D279 /* BVAppDelegate.m */,
DF0E448A173B837B00C6D279 /* MainStoryboard.storyboard */,
DF0E448D173B837B00C6D279 /* BVViewController.h */,
DF0E448E173B837B00C6D279 /* BVViewController.m */,
DF0E447A173B837B00C6D279 /* SingletonPattern-Info.plist */,
DF0E447B173B837B00C6D279 /* InfoPlist.strings */,
DF0E447E173B837B00C6D279 /* main.m */,
DF0E4480173B837B00C6D279 /* SingletonPattern-Prefix.pch */,
DF0E4484173B837B00C6D279 /* Default.png */,
DF0E4486173B837B00C6D279 /* [email protected] */,
DF0E4488173B837B00C6D279 /* [email protected] */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
DF0E446E173B837B00C6D279 /* SingletonPattern */ = {
isa = PBXNativeTarget;
buildConfigurationList = DF0E4492173B837B00C6D279 /* Build configuration list for PBXNativeTarget "SingletonPattern" */;
buildPhases = (
DF0E446B173B837B00C6D279 /* Sources */,
DF0E446C173B837B00C6D279 /* Frameworks */,
DF0E446D173B837B00C6D279 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = SingletonPattern;
productName = SingletonPattern;
productReference = DF0E446F173B837B00C6D279 /* SingletonPattern.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
DF0E4467173B837B00C6D279 /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = BV;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = BeyondVincent;
};
buildConfigurationList = DF0E446A173B837B00C6D279 /* Build configuration list for PBXProject "SingletonPattern" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = DF0E4466173B837B00C6D279;
productRefGroup = DF0E4470173B837B00C6D279 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
DF0E446E173B837B00C6D279 /* SingletonPattern */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
DF0E446D173B837B00C6D279 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DF0E447D173B837B00C6D279 /* InfoPlist.strings in Resources */,
DF0E4485173B837B00C6D279 /* Default.png in Resources */,
DF0E4487173B837B00C6D279 /* [email protected] in Resources */,
DF0E4489173B837B00C6D279 /* [email protected] in Resources */,
DF0E448C173B837B00C6D279 /* MainStoryboard.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
DF0E446B173B837B00C6D279 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DF0E447F173B837B00C6D279 /* main.m in Sources */,
DF0E4483173B837B00C6D279 /* BVAppDelegate.m in Sources */,
DF0E448F173B837B00C6D279 /* BVViewController.m in Sources */,
DF0E4497173B83DC00C6D279 /* BVNonARCSingleton.m in Sources */,
DF0E449A173B8D3B00C6D279 /* BVARCSingleton.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
DF0E447B173B837B00C6D279 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
DF0E447C173B837B00C6D279 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
DF0E448A173B837B00C6D279 /* MainStoryboard.storyboard */ = {
isa = PBXVariantGroup;
children = (
DF0E448B173B837B00C6D279 /* en */,
);
name = MainStoryboard.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
DF0E4490173B837B00C6D279 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
DF0E4491173B837B00C6D279 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
DF0E4493173B837B00C6D279 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SingletonPattern/SingletonPattern-Prefix.pch";
INFOPLIST_FILE = "SingletonPattern/SingletonPattern-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
DF0E4494173B837B00C6D279 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SingletonPattern/SingletonPattern-Prefix.pch";
INFOPLIST_FILE = "SingletonPattern/SingletonPattern-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
DF0E446A173B837B00C6D279 /* Build configuration list for PBXProject "SingletonPattern" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DF0E4490173B837B00C6D279 /* Debug */,
DF0E4491173B837B00C6D279 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DF0E4492173B837B00C6D279 /* Build configuration list for PBXNativeTarget "SingletonPattern" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DF0E4493173B837B00C6D279 /* Debug */,
DF0E4494173B837B00C6D279 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = DF0E4467173B837B00C6D279 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SingletonPattern/BVAppDelegate.m"
timestampString = "389781730.732618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "18"
endingLineNumber = "18"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
Loading

0 comments on commit 8a7ef9d

Please sign in to comment.