Browse Source

init Project

caojinguo@wallstreetcn.com 5 years ago
commit
8c7b754498
27 changed files with 1451 additions and 0 deletions
  1. BIN
      EB5894EF-367F-4DA6-A847-7CCB1F5D6402.jpg
  2. 5 0
      README.md
  3. 485 0
      RunTimeThingDemo/RunTimeThing.xcodeproj/project.pbxproj
  4. 7 0
      RunTimeThingDemo/RunTimeThing.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  5. BIN
      RunTimeThingDemo/RunTimeThing.xcodeproj/project.xcworkspace/xcuserdata/Linzhixiao.xcuserdatad/UserInterfaceState.xcuserstate
  6. 5 0
      RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  7. 101 0
      RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcschemes/RunTimeThing.xcscheme
  8. 27 0
      RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcschemes/xcschememanagement.plist
  9. 17 0
      RunTimeThingDemo/RunTimeThing/AppDelegate.h
  10. 45 0
      RunTimeThingDemo/RunTimeThing/AppDelegate.m
  11. 38 0
      RunTimeThingDemo/RunTimeThing/Assets.xcassets/AppIcon.appiconset/Contents.json
  12. 27 0
      RunTimeThingDemo/RunTimeThing/Base.lproj/LaunchScreen.storyboard
  13. 47 0
      RunTimeThingDemo/RunTimeThing/Base.lproj/Main.storyboard
  14. 40 0
      RunTimeThingDemo/RunTimeThing/Info.plist
  15. 15 0
      RunTimeThingDemo/RunTimeThing/Person+addProperty.h
  16. 24 0
      RunTimeThingDemo/RunTimeThing/Person+addProperty.m
  17. 36 0
      RunTimeThingDemo/RunTimeThing/Person.h
  18. 36 0
      RunTimeThingDemo/RunTimeThing/Person.m
  19. 15 0
      RunTimeThingDemo/RunTimeThing/ResultViewController.h
  20. 70 0
      RunTimeThingDemo/RunTimeThing/ResultViewController.m
  21. 42 0
      RunTimeThingDemo/RunTimeThing/RunTimeUtility.h
  22. 141 0
      RunTimeThingDemo/RunTimeThing/RunTimeUtility.m
  23. 15 0
      RunTimeThingDemo/RunTimeThing/ViewController.h
  24. 134 0
      RunTimeThingDemo/RunTimeThing/ViewController.m
  25. 16 0
      RunTimeThingDemo/RunTimeThing/main.m
  26. 24 0
      RunTimeThingDemo/RunTimeThingTests/Info.plist
  27. 39 0
      RunTimeThingDemo/RunTimeThingTests/RunTimeThingTests.m

BIN
EB5894EF-367F-4DA6-A847-7CCB1F5D6402.jpg


+ 5 - 0
README.md

@@ -0,0 +1,5 @@
+# AboutRunTime
+RunTimeThing
+ ![image](https://github.com/Winerywine/AboutRunTime/blob/master/EB5894EF-367F-4DA6-A847-7CCB1F5D6402.jpg)
+
+

+ 485 - 0
RunTimeThingDemo/RunTimeThing.xcodeproj/project.pbxproj

@@ -0,0 +1,485 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		962DBFDE1CC0AEE40075BF6F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DBFDD1CC0AEE40075BF6F /* main.m */; };
+		962DBFE11CC0AEE40075BF6F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DBFE01CC0AEE40075BF6F /* AppDelegate.m */; };
+		962DBFE41CC0AEE40075BF6F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DBFE31CC0AEE40075BF6F /* ViewController.m */; };
+		962DBFE71CC0AEE40075BF6F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 962DBFE51CC0AEE40075BF6F /* Main.storyboard */; };
+		962DBFE91CC0AEE40075BF6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 962DBFE81CC0AEE40075BF6F /* Assets.xcassets */; };
+		962DBFEC1CC0AEE40075BF6F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 962DBFEA1CC0AEE40075BF6F /* LaunchScreen.storyboard */; };
+		962DBFF71CC0AEE40075BF6F /* RunTimeThingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DBFF61CC0AEE40075BF6F /* RunTimeThingTests.m */; };
+		962DC0051CC0B0870075BF6F /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DC0041CC0B0870075BF6F /* Person.m */; };
+		962DC0081CC0B6410075BF6F /* RunTimeUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DC0071CC0B6410075BF6F /* RunTimeUtility.m */; };
+		962DC00B1CC0B9900075BF6F /* ResultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DC00A1CC0B9900075BF6F /* ResultViewController.m */; };
+		962DC00E1CC0F7AF0075BF6F /* Person+addProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 962DC00D1CC0F7AF0075BF6F /* Person+addProperty.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		962DBFF31CC0AEE40075BF6F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 962DBFD11CC0AEE30075BF6F /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 962DBFD81CC0AEE30075BF6F;
+			remoteInfo = RunTimeThing;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		962DBFD91CC0AEE40075BF6F /* RunTimeThing.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RunTimeThing.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		962DBFDD1CC0AEE40075BF6F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		962DBFDF1CC0AEE40075BF6F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		962DBFE01CC0AEE40075BF6F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		962DBFE21CC0AEE40075BF6F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+		962DBFE31CC0AEE40075BF6F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+		962DBFE61CC0AEE40075BF6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		962DBFE81CC0AEE40075BF6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		962DBFEB1CC0AEE40075BF6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		962DBFED1CC0AEE40075BF6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		962DBFF21CC0AEE40075BF6F /* RunTimeThingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunTimeThingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		962DBFF61CC0AEE40075BF6F /* RunTimeThingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RunTimeThingTests.m; sourceTree = "<group>"; };
+		962DBFF81CC0AEE40075BF6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		962DC0031CC0B0870075BF6F /* Person.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = "<group>"; };
+		962DC0041CC0B0870075BF6F /* Person.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = "<group>"; };
+		962DC0061CC0B6410075BF6F /* RunTimeUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunTimeUtility.h; sourceTree = "<group>"; };
+		962DC0071CC0B6410075BF6F /* RunTimeUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RunTimeUtility.m; sourceTree = "<group>"; };
+		962DC0091CC0B9900075BF6F /* ResultViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultViewController.h; sourceTree = "<group>"; };
+		962DC00A1CC0B9900075BF6F /* ResultViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResultViewController.m; sourceTree = "<group>"; };
+		962DC00C1CC0F7AF0075BF6F /* Person+addProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Person+addProperty.h"; sourceTree = "<group>"; };
+		962DC00D1CC0F7AF0075BF6F /* Person+addProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Person+addProperty.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		962DBFD61CC0AEE30075BF6F /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		962DBFEF1CC0AEE40075BF6F /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		962DBFD01CC0AEE30075BF6F = {
+			isa = PBXGroup;
+			children = (
+				962DBFDB1CC0AEE40075BF6F /* RunTimeThing */,
+				962DBFF51CC0AEE40075BF6F /* RunTimeThingTests */,
+				962DBFDA1CC0AEE40075BF6F /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		962DBFDA1CC0AEE40075BF6F /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				962DBFD91CC0AEE40075BF6F /* RunTimeThing.app */,
+				962DBFF21CC0AEE40075BF6F /* RunTimeThingTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		962DBFDB1CC0AEE40075BF6F /* RunTimeThing */ = {
+			isa = PBXGroup;
+			children = (
+				962DC0021CC0AEF60075BF6F /* Delegate */,
+				962DC0011CC0AEED0075BF6F /* Controller */,
+				962DC00F1CC1020E0075BF6F /* Model */,
+				962DC0101CC102160075BF6F /* Category */,
+				962DC0111CC102230075BF6F /* RunTime */,
+				962DBFDC1CC0AEE40075BF6F /* Supporting Files */,
+			);
+			path = RunTimeThing;
+			sourceTree = "<group>";
+		};
+		962DBFDC1CC0AEE40075BF6F /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				962DBFE81CC0AEE40075BF6F /* Assets.xcassets */,
+				962DBFED1CC0AEE40075BF6F /* Info.plist */,
+				962DBFE51CC0AEE40075BF6F /* Main.storyboard */,
+				962DBFEA1CC0AEE40075BF6F /* LaunchScreen.storyboard */,
+				962DBFDD1CC0AEE40075BF6F /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		962DBFF51CC0AEE40075BF6F /* RunTimeThingTests */ = {
+			isa = PBXGroup;
+			children = (
+				962DBFF61CC0AEE40075BF6F /* RunTimeThingTests.m */,
+				962DBFF81CC0AEE40075BF6F /* Info.plist */,
+			);
+			path = RunTimeThingTests;
+			sourceTree = "<group>";
+		};
+		962DC0011CC0AEED0075BF6F /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				962DBFE21CC0AEE40075BF6F /* ViewController.h */,
+				962DBFE31CC0AEE40075BF6F /* ViewController.m */,
+				962DC0091CC0B9900075BF6F /* ResultViewController.h */,
+				962DC00A1CC0B9900075BF6F /* ResultViewController.m */,
+			);
+			name = Controller;
+			sourceTree = "<group>";
+		};
+		962DC0021CC0AEF60075BF6F /* Delegate */ = {
+			isa = PBXGroup;
+			children = (
+				962DBFDF1CC0AEE40075BF6F /* AppDelegate.h */,
+				962DBFE01CC0AEE40075BF6F /* AppDelegate.m */,
+			);
+			name = Delegate;
+			sourceTree = "<group>";
+		};
+		962DC00F1CC1020E0075BF6F /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				962DC0031CC0B0870075BF6F /* Person.h */,
+				962DC0041CC0B0870075BF6F /* Person.m */,
+			);
+			name = Model;
+			sourceTree = "<group>";
+		};
+		962DC0101CC102160075BF6F /* Category */ = {
+			isa = PBXGroup;
+			children = (
+				962DC00C1CC0F7AF0075BF6F /* Person+addProperty.h */,
+				962DC00D1CC0F7AF0075BF6F /* Person+addProperty.m */,
+			);
+			name = Category;
+			sourceTree = "<group>";
+		};
+		962DC0111CC102230075BF6F /* RunTime */ = {
+			isa = PBXGroup;
+			children = (
+				962DC0061CC0B6410075BF6F /* RunTimeUtility.h */,
+				962DC0071CC0B6410075BF6F /* RunTimeUtility.m */,
+			);
+			name = RunTime;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		962DBFD81CC0AEE30075BF6F /* RunTimeThing */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 962DBFFB1CC0AEE40075BF6F /* Build configuration list for PBXNativeTarget "RunTimeThing" */;
+			buildPhases = (
+				962DBFD51CC0AEE30075BF6F /* Sources */,
+				962DBFD61CC0AEE30075BF6F /* Frameworks */,
+				962DBFD71CC0AEE30075BF6F /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = RunTimeThing;
+			productName = RunTimeThing;
+			productReference = 962DBFD91CC0AEE40075BF6F /* RunTimeThing.app */;
+			productType = "com.apple.product-type.application";
+		};
+		962DBFF11CC0AEE40075BF6F /* RunTimeThingTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 962DBFFE1CC0AEE40075BF6F /* Build configuration list for PBXNativeTarget "RunTimeThingTests" */;
+			buildPhases = (
+				962DBFEE1CC0AEE40075BF6F /* Sources */,
+				962DBFEF1CC0AEE40075BF6F /* Frameworks */,
+				962DBFF01CC0AEE40075BF6F /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				962DBFF41CC0AEE40075BF6F /* PBXTargetDependency */,
+			);
+			name = RunTimeThingTests;
+			productName = RunTimeThingTests;
+			productReference = 962DBFF21CC0AEE40075BF6F /* RunTimeThingTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		962DBFD11CC0AEE30075BF6F /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0730;
+				ORGANIZATIONNAME = Linzhixiao;
+				TargetAttributes = {
+					962DBFD81CC0AEE30075BF6F = {
+						CreatedOnToolsVersion = 7.3;
+						DevelopmentTeam = UYUBLP3RCN;
+					};
+					962DBFF11CC0AEE40075BF6F = {
+						CreatedOnToolsVersion = 7.3;
+						DevelopmentTeam = UYUBLP3RCN;
+						TestTargetID = 962DBFD81CC0AEE30075BF6F;
+					};
+				};
+			};
+			buildConfigurationList = 962DBFD41CC0AEE30075BF6F /* Build configuration list for PBXProject "RunTimeThing" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 962DBFD01CC0AEE30075BF6F;
+			productRefGroup = 962DBFDA1CC0AEE40075BF6F /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				962DBFD81CC0AEE30075BF6F /* RunTimeThing */,
+				962DBFF11CC0AEE40075BF6F /* RunTimeThingTests */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		962DBFD71CC0AEE30075BF6F /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				962DBFEC1CC0AEE40075BF6F /* LaunchScreen.storyboard in Resources */,
+				962DBFE91CC0AEE40075BF6F /* Assets.xcassets in Resources */,
+				962DBFE71CC0AEE40075BF6F /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		962DBFF01CC0AEE40075BF6F /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		962DBFD51CC0AEE30075BF6F /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				962DBFE41CC0AEE40075BF6F /* ViewController.m in Sources */,
+				962DBFE11CC0AEE40075BF6F /* AppDelegate.m in Sources */,
+				962DC00E1CC0F7AF0075BF6F /* Person+addProperty.m in Sources */,
+				962DC0081CC0B6410075BF6F /* RunTimeUtility.m in Sources */,
+				962DC0051CC0B0870075BF6F /* Person.m in Sources */,
+				962DBFDE1CC0AEE40075BF6F /* main.m in Sources */,
+				962DC00B1CC0B9900075BF6F /* ResultViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		962DBFEE1CC0AEE40075BF6F /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				962DBFF71CC0AEE40075BF6F /* RunTimeThingTests.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		962DBFF41CC0AEE40075BF6F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 962DBFD81CC0AEE30075BF6F /* RunTimeThing */;
+			targetProxy = 962DBFF31CC0AEE40075BF6F /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		962DBFE51CC0AEE40075BF6F /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				962DBFE61CC0AEE40075BF6F /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		962DBFEA1CC0AEE40075BF6F /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				962DBFEB1CC0AEE40075BF6F /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		962DBFF91CC0AEE40075BF6F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		962DBFFA1CC0AEE40075BF6F /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.3;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		962DBFFC1CC0AEE40075BF6F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = RunTimeThing/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.b5m.RunTimeThing;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		962DBFFD1CC0AEE40075BF6F /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				INFOPLIST_FILE = RunTimeThing/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.b5m.RunTimeThing;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+		962DBFFF1CC0AEE40075BF6F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				INFOPLIST_FILE = RunTimeThingTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.b5m.RunTimeThingTests;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RunTimeThing.app/RunTimeThing";
+			};
+			name = Debug;
+		};
+		962DC0001CC0AEE40075BF6F /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				INFOPLIST_FILE = RunTimeThingTests/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.b5m.RunTimeThingTests;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RunTimeThing.app/RunTimeThing";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		962DBFD41CC0AEE30075BF6F /* Build configuration list for PBXProject "RunTimeThing" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				962DBFF91CC0AEE40075BF6F /* Debug */,
+				962DBFFA1CC0AEE40075BF6F /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		962DBFFB1CC0AEE40075BF6F /* Build configuration list for PBXNativeTarget "RunTimeThing" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				962DBFFC1CC0AEE40075BF6F /* Debug */,
+				962DBFFD1CC0AEE40075BF6F /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		962DBFFE1CC0AEE40075BF6F /* Build configuration list for PBXNativeTarget "RunTimeThingTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				962DBFFF1CC0AEE40075BF6F /* Debug */,
+				962DC0001CC0AEE40075BF6F /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 962DBFD11CC0AEE30075BF6F /* Project object */;
+}

+ 7 - 0
RunTimeThingDemo/RunTimeThing.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:RunTimeThing.xcodeproj">
+   </FileRef>
+</Workspace>

BIN
RunTimeThingDemo/RunTimeThing.xcodeproj/project.xcworkspace/xcuserdata/Linzhixiao.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 0
RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   type = "1"
+   version = "2.0">
+</Bucket>

+ 101 - 0
RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcschemes/RunTimeThing.xcscheme

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0730"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "962DBFD81CC0AEE30075BF6F"
+               BuildableName = "RunTimeThing.app"
+               BlueprintName = "RunTimeThing"
+               ReferencedContainer = "container:RunTimeThing.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "962DBFF11CC0AEE40075BF6F"
+               BuildableName = "RunTimeThingTests.xctest"
+               BlueprintName = "RunTimeThingTests"
+               ReferencedContainer = "container:RunTimeThing.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "962DBFD81CC0AEE30075BF6F"
+            BuildableName = "RunTimeThing.app"
+            BlueprintName = "RunTimeThing"
+            ReferencedContainer = "container:RunTimeThing.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "962DBFD81CC0AEE30075BF6F"
+            BuildableName = "RunTimeThing.app"
+            BlueprintName = "RunTimeThing"
+            ReferencedContainer = "container:RunTimeThing.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "962DBFD81CC0AEE30075BF6F"
+            BuildableName = "RunTimeThing.app"
+            BlueprintName = "RunTimeThing"
+            ReferencedContainer = "container:RunTimeThing.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 27 - 0
RunTimeThingDemo/RunTimeThing.xcodeproj/xcuserdata/Linzhixiao.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>RunTimeThing.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>962DBFD81CC0AEE30075BF6F</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+		<key>962DBFF11CC0AEE40075BF6F</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 17 - 0
RunTimeThingDemo/RunTimeThing/AppDelegate.h

@@ -0,0 +1,17 @@
+//
+//  AppDelegate.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+
+@end
+

+ 45 - 0
RunTimeThingDemo/RunTimeThing/AppDelegate.m

@@ -0,0 +1,45 @@
+//
+//  AppDelegate.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@interface AppDelegate ()
+
+@end
+
+@implementation AppDelegate
+
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+    // Override point for customization after application launch.
+    return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end

+ 38 - 0
RunTimeThingDemo/RunTimeThing/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,38 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 27 - 0
RunTimeThingDemo/RunTimeThing/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+</document>

+ 47 - 0
RunTimeThingDemo/RunTimeThing/Base.lproj/Main.storyboard

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="F3n-BL-IH1">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                    <navigationItem key="navigationItem" id="Tnv-yN-AyL"/>
+                    <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="1246.5" y="418.5"/>
+        </scene>
+        <!--Navigation Controller-->
+        <scene sceneID="Vfq-yo-JiL">
+            <objects>
+                <navigationController automaticallyAdjustsScrollViewInsets="NO" id="F3n-BL-IH1" sceneMemberID="viewController">
+                    <toolbarItems/>
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="hQD-H0-lXU">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </navigationBar>
+                    <nil name="viewControllers"/>
+                    <connections>
+                        <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="P05-pl-1r1"/>
+                    </connections>
+                </navigationController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="Qgz-p2-lxR" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-98" y="419"/>
+        </scene>
+    </scenes>
+</document>

+ 40 - 0
RunTimeThingDemo/RunTimeThing/Info.plist

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>

+ 15 - 0
RunTimeThingDemo/RunTimeThing/Person+addProperty.h

@@ -0,0 +1,15 @@
+//
+//  Person+addProperty.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "Person.h"
+
+@interface Person (addProperty)
+
+@property (nonatomic, copy) NSString *englishName;
+
+@end

+ 24 - 0
RunTimeThingDemo/RunTimeThing/Person+addProperty.m

@@ -0,0 +1,24 @@
+//
+//  Person+addProperty.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "Person+addProperty.h"
+#import <objc/runtime.h>
+
+@implementation Person (addProperty)
+
+char eName;
+
+- (void)setEnglishName: (NSString *)englishName {
+    objc_setAssociatedObject(self, &eName, englishName, OBJC_ASSOCIATION_COPY_NONATOMIC);
+}
+
+- (NSString *)englishName {
+    return objc_getAssociatedObject(self, &eName);
+}
+
+@end

+ 36 - 0
RunTimeThingDemo/RunTimeThing/Person.h

@@ -0,0 +1,36 @@
+//
+//  Person.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@protocol personDelegate <NSObject>
+
+- (void)personPayForFun: (NSInteger )money;
+
+@end
+
+@interface Person : NSObject
+
+@property (nonatomic, copy)   NSString *name;
+@property (nonatomic, copy)   NSString *sex;
+@property (nonatomic, assign) NSInteger age;
+@property (nonatomic, assign) float     height;
+@property (nonatomic, copy)   NSString *job;
+@property (nonatomic, copy)   NSString *native; // 籍贯
+@property (nonatomic, assign) id <personDelegate> delegate;
+
+- (void)eat;
+
+- (void)sleep;
+
+- (NSString *)sing;
+
+- (NSString *)drink;
+
+@end
+

+ 36 - 0
RunTimeThingDemo/RunTimeThing/Person.m

@@ -0,0 +1,36 @@
+//
+//  Person.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "Person.h"
+#import <objc/runtime.h>
+
+@interface Person ()
+
+@property (nonatomic, copy) NSString *education;
+
+@end
+
+@implementation Person
+
+- (void)eat {
+    
+}
+
+- (void)sleep {
+    NSLog(@"抓紧时间睡觉");
+}
+
+- (NSString *)sing; {
+    return @"我要去唱歌";
+}
+
+- (NSString *)drink {
+    return @"我要去喝水";
+}
+
+@end

+ 15 - 0
RunTimeThingDemo/RunTimeThing/ResultViewController.h

@@ -0,0 +1,15 @@
+//
+//  ResultViewController.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ResultViewController : UIViewController
+
+@property (nonatomic, strong) NSMutableArray *resultDataSourceArray;
+
+@end

+ 70 - 0
RunTimeThingDemo/RunTimeThing/ResultViewController.m

@@ -0,0 +1,70 @@
+//
+//  ResultViewController.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "ResultViewController.h"
+
+NSString * const cellIdentifier = @"cell";
+
+@interface ResultViewController () <UITableViewDelegate, UITableViewDataSource>
+
+@property (nonatomic, strong) UITableView *resultListTableView;
+
+
+@end
+
+@implementation ResultViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self configNavigationBackBarButtonItem];
+    [self.view addSubview:self.resultListTableView];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+#pragma mark - Custom Accessors
+
+- (UITableView *)resultListTableView {
+    if (!_resultListTableView) {
+        _resultListTableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain];
+        _resultListTableView.dataSource = self;
+        _resultListTableView.delegate = self;
+    }
+    return _resultListTableView;
+}
+
+#pragma mark - Navigation
+
+- (void)configNavigationBackBarButtonItem {
+    UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(backBarButtonItemAction:)];
+    self.navigationItem.leftBarButtonItem = backBarButtonItem;
+}
+
+- (void)backBarButtonItemAction: (UIBarButtonItem *)backBarButtonItem {
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+#pragma mark - UITableViewDelegate, UITableViewDataSource
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _resultDataSourceArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
+    if (!cell) {
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
+    }
+    cell.textLabel.text = _resultDataSourceArray[indexPath.row];
+    return cell;
+}
+
+@end

+ 42 - 0
RunTimeThingDemo/RunTimeThing/RunTimeUtility.h

@@ -0,0 +1,42 @@
+//
+//  RunTimeModel.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "Person.h"
+
+@interface RunTimeUtility : NSObject
+
+// 获取类的所有成员变量
+
++ (NSMutableArray *)getClassAllMemberProperty;
+
+// 获取类的所有属性名
+
++ (NSMutableArray *)getClassAllPropertyName;
+
+// 获取类的所有方法
+
++ (NSMutableArray *)getClassAllMethod;
+
+// 获取类遵循的全部协议
+
++ (NSMutableArray *)getClassAllProtocolWithClass: (Class )className;
+
+// 动态改变成员变量
+
+- (void)changeClassPropertyValueWithPersonObject: (Person *)person;
+
+// 动态交换类的方法
+
++ (void)exchangeClassMethod;
+
+// 动态添加新方法
+
++ (NSString *)addAndDoFromCityMethodWithPersonObject: (Person *)person;
+
+@end

+ 141 - 0
RunTimeThingDemo/RunTimeThing/RunTimeUtility.m

@@ -0,0 +1,141 @@
+//
+//  RunTimeModel.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "RunTimeUtility.h"
+#import <objc/runtime.h>
+
+@implementation RunTimeUtility
+
++ (NSMutableArray *)getClassAllMemberProperty {
+    unsigned int count;
+    
+    NSMutableArray *array = [NSMutableArray array];
+    // 获取成员变量的数组的指针
+    Ivar *ivars = class_copyIvarList([Person class], &count);
+    for (int i = 0; i < count; i ++) {
+        Ivar ivar = ivars[i];
+        // 更加ivar获得其成员变量的名称
+        const char *name = ivar_getName(ivar);
+        // C的字符串转OC的字符串
+        NSString *key = [NSString stringWithUTF8String:name];
+        [array addObject:key];
+    }
+    free(ivars);
+    return array;
+}
+
++ (NSMutableArray *)getClassAllPropertyName {
+    unsigned int count;
+    
+    NSMutableArray *array = [NSMutableArray array];
+    // 获得指向该类所有属性的指针
+    objc_property_t *properties = class_copyPropertyList([Person class], &count);
+    
+    for (int i = 0; i < count; i ++) {
+        // 获取该类的一个属性的指针
+        objc_property_t property = properties[i];
+        // 获取属性的名称
+        const char *name = property_getName(property);
+        // 转换
+        NSString *key = [NSString stringWithUTF8String:name];
+        [array addObject:key];
+    }
+    free(properties);
+    return array;
+}
+
++ (NSMutableArray *)getClassAllMethod {
+    unsigned int count;
+    
+    NSMutableArray *array = [NSMutableArray array];
+    // 获取指向该类的所有方法的指针
+    Method *methods = class_copyMethodList([Person class], &count);
+    
+    for (int i = 0; i < count; i ++) {
+        // 获取该类的一个方法的指针
+        Method method = methods[i];
+        // 获取方法
+        SEL methodSEL = method_getName(method);
+        // 将方法转为C字符串
+        const char *name = sel_getName(methodSEL);
+        // 将C字符串转为OC字符串
+        NSString *methodName = [NSString stringWithUTF8String:name];
+        
+        // 获取方法参数
+//        int arguments = method_getNumberOfArguments(method);
+        
+        [array addObject:methodName];
+    }
+    free(methods);
+    return array;
+}
+
++ (NSMutableArray *)getClassAllProtocolWithClass: (Class )className {
+    unsigned int count;
+    
+    NSMutableArray *array = [NSMutableArray array];
+    // 获取指向该类遵循的所有协议的数组指针
+    __unsafe_unretained Protocol **protocols = class_copyProtocolList([className class], &count);
+    
+    for (int i = 0; i < count; i ++) {
+        // 获取该类遵循的一个协议指针
+        Protocol *protocol = protocols[i];
+        // 获取C字符串协议名
+        const char *name = protocol_getName(protocol);
+        // C字符串转OC字符串
+        NSString *protocolName = [NSString stringWithUTF8String:name];
+        [array addObject:protocolName];
+    }
+    free(protocols);
+    return array;
+}
+
+- (void)changeClassPropertyValueWithPersonObject: (Person *)person {
+    unsigned int count = 0;
+    Ivar *ivar = class_copyIvarList([Person class], &count);
+    for (int i = 0; i < count; i ++) {
+        Ivar var = ivar[i];
+        const char *varName = ivar_getName(var);
+        NSString *name = [NSString stringWithUTF8String:varName];
+        if ([name isEqualToString:@"_name"]) {
+            object_setIvar(person, var, @"张三");
+            break;
+        }
+    }
+    free(ivar);
+}
+
++ (void)exchangeClassMethod {
+    Method m1= class_getInstanceMethod([Person class], @selector(sing));
+    Method m2 = class_getInstanceMethod([Person class], @selector(drink));
+    
+    method_exchangeImplementations(m1, m2);
+    
+    
+}
+
++ (NSString *)addAndDoFromCityMethodWithPersonObject: (Person *)person {
+    class_addMethod([Person class], @selector(fromCity:), (IMP)fromCityAnswer, "v@:@");
+    if ([person respondsToSelector:@selector(fromCity:)]) {
+        //Method method = class_getInstanceMethod([self.xiaoMing class], @selector(guess));
+        [person performSelector:@selector(fromCity:) withObject:@"广州"];
+        
+    } else{
+        NSLog(@"无法告诉你我从哪儿来");
+    }
+    return @"我来自广州";
+}
+
+void fromCityAnswer(id self,SEL _cmd,NSString *str){
+    
+    NSLog(@"我来自:%@",str);
+}
+
+
+
+@end

+ 15 - 0
RunTimeThingDemo/RunTimeThing/ViewController.h

@@ -0,0 +1,15 @@
+//
+//  ViewController.h
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UIViewController
+
+
+@end
+

+ 134 - 0
RunTimeThingDemo/RunTimeThing/ViewController.m

@@ -0,0 +1,134 @@
+//
+//  ViewController.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import "ViewController.h"
+#import <objc/runtime.h> // 包含对类、成员变量、属性、方法的操作
+#import <objc/message.h> // 包含消息机制
+#import "RunTimeUtility.h"
+#import "ResultViewController.h"
+#import "Person+addProperty.h"
+
+static NSString * const cellIdentifier = @"cell";
+
+@interface ViewController () <UITableViewDataSource, UITableViewDelegate>
+
+@property (nonatomic, strong) UITableView *tableView;
+@property (nonatomic, strong) NSArray *dataSourceArray;
+@property (nonatomic, strong) NSMutableArray *allresultArray;
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.title = @"runtime那些事";
+    [self dealWithDataSource];
+    
+    [self.view addSubview:self.tableView];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+#pragma mark - Custom Accessors
+
+- (UITableView *)tableView {
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+    }
+    return _tableView;
+}
+
+#pragma mark - Private
+
+- (void)dealWithDataSource {
+    self.dataSourceArray = @[@"1.获取类成员变量",@"2.获取类全部属性名",@"3.获取类全部方法",@"4.获取类全部协议",@"5.动态改变成员变量的值(name改为张三)",@"6.动态交换类的方法顺序:sing->drink",@"7.动态添加新方法(fromCity:)",@"8.category添加属性"];
+}
+
+#pragma mark - UITableViewDataSource, UITableViewDelegate
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _dataSourceArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
+    if (!cell) {
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
+    }
+    cell.textLabel.text = _dataSourceArray[indexPath.row];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    switch (indexPath.row) {
+        case 0:
+        {
+            self.allresultArray = [RunTimeUtility getClassAllMemberProperty];
+        }
+            break;
+        case 1:
+        {
+            self.allresultArray = [RunTimeUtility getClassAllPropertyName];
+        }
+            break;
+        case 2:
+        {
+            self.allresultArray = [RunTimeUtility getClassAllMethod];
+        }
+            break;
+        case 3:
+        {
+            self.allresultArray = [RunTimeUtility getClassAllProtocolWithClass:[self class]];
+        }
+            break;
+        case 4:
+        {
+            Person *person = [[Person alloc] init];
+            person.name = @"李四";
+            RunTimeUtility *runTimeUtility = [[RunTimeUtility alloc] init];
+            [runTimeUtility changeClassPropertyValueWithPersonObject:person];
+            self.allresultArray= [NSMutableArray arrayWithObjects:person.name, nil];
+        }
+            break;
+        case 5:
+        {
+            [RunTimeUtility exchangeClassMethod];
+            Person *person = [[Person alloc] init];
+            self.allresultArray= [NSMutableArray arrayWithObjects:[person sing],[person drink], nil];
+        }
+            break;
+        case 6:
+        {
+            NSString *methodValue = [RunTimeUtility addAndDoFromCityMethodWithPersonObject:[[Person alloc] init]];
+            self.allresultArray= [NSMutableArray arrayWithObjects:methodValue, nil];
+        }
+            break;
+        case 7:
+        {
+            Person*person = [[Person alloc] init];
+            person.englishName = @"Xiao Wang";
+            self.allresultArray= [NSMutableArray arrayWithObjects:[NSString stringWithFormat:@"englishName: %@",person.englishName], nil];
+        }
+            break;
+        default:
+            break;
+    }
+    ResultViewController *resultViewController = [[ResultViewController alloc] init];
+    resultViewController.resultDataSourceArray = self.allresultArray;
+    resultViewController.title = _dataSourceArray[indexPath.row];
+    [self.navigationController pushViewController:resultViewController animated:YES];
+}
+
+@end

+ 16 - 0
RunTimeThingDemo/RunTimeThing/main.m

@@ -0,0 +1,16 @@
+//
+//  main.m
+//  RunTimeThing
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+    @autoreleasepool {
+        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+    }
+}

+ 24 - 0
RunTimeThingDemo/RunTimeThingTests/Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>

+ 39 - 0
RunTimeThingDemo/RunTimeThingTests/RunTimeThingTests.m

@@ -0,0 +1,39 @@
+//
+//  RunTimeThingTests.m
+//  RunTimeThingTests
+//
+//  Created by Linzhixiao on 16/4/15.
+//  Copyright © 2016年 Linzhixiao. All rights reserved.
+//
+
+#import <XCTest/XCTest.h>
+
+@interface RunTimeThingTests : XCTestCase
+
+@end
+
+@implementation RunTimeThingTests
+
+- (void)setUp {
+    [super setUp];
+    // Put setup code here. This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown {
+    // Put teardown code here. This method is called after the invocation of each test method in the class.
+    [super tearDown];
+}
+
+- (void)testExample {
+    // This is an example of a functional test case.
+    // Use XCTAssert and related functions to verify your tests produce the correct results.
+}
+
+- (void)testPerformanceExample {
+    // This is an example of a performance test case.
+    [self measureBlock:^{
+        // Put the code you want to measure the time of here.
+    }];
+}
+
+@end