From 485bbd7d937979bc73c91347a4a5c31840b2e3b0 Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:08:58 +0800 Subject: [PATCH 1/7] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c1625d1..e21f6bf 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,5 @@ * UIKit性能调优实战讲解:[简书](http://www.jianshu.com/p/619cf14640f3)、[bestswifter](http://bestswifter.com/uikitxing-neng-diao-you-shi-zhan-jiang-jie/) * Swift递归枚举与红黑树:[简书](http://www.jianshu.com/p/ad09e1f404b0) * 史上最简单的UIScrollView+Autolayout出坑指南:[简书](http://www.jianshu.com/p/f7f1ba67c3ca)、[bestswifter](http://bestswifter.com/uiscrollviewwithautolayout/) -* 几个加速Swift开发的小tip:[简书](http://www.jianshu.com/p/5ebd5e8ecf60) \ No newline at end of file +* 几个加速Swift开发的小tip:[简书](http://www.jianshu.com/p/5ebd5e8ecf60) +*什么幺蛾子 From f0b716a666faed295265c987c54ad11f9f83bac7 Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:13:37 +0800 Subject: [PATCH 2/7] text --- text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 text.txt diff --git a/text.txt b/text.txt new file mode 100644 index 0000000..f3a3485 --- /dev/null +++ b/text.txt @@ -0,0 +1 @@ +text \ No newline at end of file From a9666bcbc8c18bfe438383716e3c89ae05827dda Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:18:46 +0800 Subject: [PATCH 3/7] text3 --- text.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/text.txt b/text.txt index f3a3485..495bab7 100644 --- a/text.txt +++ b/text.txt @@ -1 +1,3 @@ -text \ No newline at end of file +text +text2 +text3 \ No newline at end of file From 77cb742bc8ddabca11f48affb64793223a6e33e6 Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:22:05 +0800 Subject: [PATCH 4/7] Revert "text3" This reverts commit a9666bcbc8c18bfe438383716e3c89ae05827dda. --- text.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/text.txt b/text.txt index 495bab7..f3a3485 100644 --- a/text.txt +++ b/text.txt @@ -1,3 +1 @@ -text -text2 -text3 \ No newline at end of file +text \ No newline at end of file From 5f9460721b9b100c7515b95d76aeacd796a70d6a Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:22:59 +0800 Subject: [PATCH 5/7] Revert "Update README.md" This reverts commit 485bbd7d937979bc73c91347a4a5c31840b2e3b0. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e21f6bf..c1625d1 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,4 @@ * UIKit性能调优实战讲解:[简书](http://www.jianshu.com/p/619cf14640f3)、[bestswifter](http://bestswifter.com/uikitxing-neng-diao-you-shi-zhan-jiang-jie/) * Swift递归枚举与红黑树:[简书](http://www.jianshu.com/p/ad09e1f404b0) * 史上最简单的UIScrollView+Autolayout出坑指南:[简书](http://www.jianshu.com/p/f7f1ba67c3ca)、[bestswifter](http://bestswifter.com/uiscrollviewwithautolayout/) -* 几个加速Swift开发的小tip:[简书](http://www.jianshu.com/p/5ebd5e8ecf60) -*什么幺蛾子 +* 几个加速Swift开发的小tip:[简书](http://www.jianshu.com/p/5ebd5e8ecf60) \ No newline at end of file From ca7dd83c1a568842815e81e6098601560c9c0716 Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:23:46 +0800 Subject: [PATCH 6/7] =?UTF-8?q?Revert=20"=E5=88=A9=E7=94=A8=20runloop=20?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E7=BA=BF=E7=A8=8B=E4=BF=9D=E6=B4=BB"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 03128c8cd0b26d65443eb748647c85c1da0cc3e2. --- .../project.pbxproj | 308 ------------------ .../RunloopAndThread/AppDelegate.h | 17 - .../RunloopAndThread/AppDelegate.m | 45 --- .../AppIcon.appiconset/Contents.json | 38 --- .../Base.lproj/LaunchScreen.storyboard | 27 -- .../Base.lproj/Main.storyboard | 25 -- RunloopAndThread/RunloopAndThread/Info.plist | 40 --- .../RunloopAndThread/ViewController.h | 15 - .../RunloopAndThread/ViewController.m | 105 ------ RunloopAndThread/RunloopAndThread/main.m | 16 - 10 files changed, 636 deletions(-) delete mode 100644 RunloopAndThread/RunloopAndThread.xcodeproj/project.pbxproj delete mode 100644 RunloopAndThread/RunloopAndThread/AppDelegate.h delete mode 100644 RunloopAndThread/RunloopAndThread/AppDelegate.m delete mode 100644 RunloopAndThread/RunloopAndThread/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 RunloopAndThread/RunloopAndThread/Base.lproj/LaunchScreen.storyboard delete mode 100644 RunloopAndThread/RunloopAndThread/Base.lproj/Main.storyboard delete mode 100644 RunloopAndThread/RunloopAndThread/Info.plist delete mode 100644 RunloopAndThread/RunloopAndThread/ViewController.h delete mode 100644 RunloopAndThread/RunloopAndThread/ViewController.m delete mode 100644 RunloopAndThread/RunloopAndThread/main.m diff --git a/RunloopAndThread/RunloopAndThread.xcodeproj/project.pbxproj b/RunloopAndThread/RunloopAndThread.xcodeproj/project.pbxproj deleted file mode 100644 index 2b68ea4..0000000 --- a/RunloopAndThread/RunloopAndThread.xcodeproj/project.pbxproj +++ /dev/null @@ -1,308 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 9BAA82A81D451A0E00E5B98A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA82A71D451A0E00E5B98A /* main.m */; }; - 9BAA82AB1D451A0E00E5B98A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA82AA1D451A0E00E5B98A /* AppDelegate.m */; }; - 9BAA82AE1D451A0E00E5B98A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA82AD1D451A0E00E5B98A /* ViewController.m */; }; - 9BAA82B11D451A0E00E5B98A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BAA82AF1D451A0E00E5B98A /* Main.storyboard */; }; - 9BAA82B31D451A0E00E5B98A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9BAA82B21D451A0E00E5B98A /* Assets.xcassets */; }; - 9BAA82B61D451A0E00E5B98A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BAA82B41D451A0E00E5B98A /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 9BAA82A31D451A0E00E5B98A /* RunloopAndThread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RunloopAndThread.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 9BAA82A71D451A0E00E5B98A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 9BAA82A91D451A0E00E5B98A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 9BAA82AA1D451A0E00E5B98A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 9BAA82AC1D451A0E00E5B98A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 9BAA82AD1D451A0E00E5B98A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 9BAA82B01D451A0E00E5B98A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 9BAA82B21D451A0E00E5B98A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 9BAA82B51D451A0E00E5B98A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 9BAA82B71D451A0E00E5B98A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9BAA82A01D451A0E00E5B98A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9BAA829A1D451A0E00E5B98A = { - isa = PBXGroup; - children = ( - 9BAA82A51D451A0E00E5B98A /* RunloopAndThread */, - 9BAA82A41D451A0E00E5B98A /* Products */, - ); - sourceTree = ""; - }; - 9BAA82A41D451A0E00E5B98A /* Products */ = { - isa = PBXGroup; - children = ( - 9BAA82A31D451A0E00E5B98A /* RunloopAndThread.app */, - ); - name = Products; - sourceTree = ""; - }; - 9BAA82A51D451A0E00E5B98A /* RunloopAndThread */ = { - isa = PBXGroup; - children = ( - 9BAA82A91D451A0E00E5B98A /* AppDelegate.h */, - 9BAA82AA1D451A0E00E5B98A /* AppDelegate.m */, - 9BAA82AC1D451A0E00E5B98A /* ViewController.h */, - 9BAA82AD1D451A0E00E5B98A /* ViewController.m */, - 9BAA82AF1D451A0E00E5B98A /* Main.storyboard */, - 9BAA82B21D451A0E00E5B98A /* Assets.xcassets */, - 9BAA82B41D451A0E00E5B98A /* LaunchScreen.storyboard */, - 9BAA82B71D451A0E00E5B98A /* Info.plist */, - 9BAA82A61D451A0E00E5B98A /* Supporting Files */, - ); - path = RunloopAndThread; - sourceTree = ""; - }; - 9BAA82A61D451A0E00E5B98A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9BAA82A71D451A0E00E5B98A /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9BAA82A21D451A0E00E5B98A /* RunloopAndThread */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9BAA82BA1D451A0E00E5B98A /* Build configuration list for PBXNativeTarget "RunloopAndThread" */; - buildPhases = ( - 9BAA829F1D451A0E00E5B98A /* Sources */, - 9BAA82A01D451A0E00E5B98A /* Frameworks */, - 9BAA82A11D451A0E00E5B98A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RunloopAndThread; - productName = RunloopAndThread; - productReference = 9BAA82A31D451A0E00E5B98A /* RunloopAndThread.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 9BAA829B1D451A0E00E5B98A /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = bestswifter; - TargetAttributes = { - 9BAA82A21D451A0E00E5B98A = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = U2HX3RFD94; - }; - }; - }; - buildConfigurationList = 9BAA829E1D451A0E00E5B98A /* Build configuration list for PBXProject "RunloopAndThread" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 9BAA829A1D451A0E00E5B98A; - productRefGroup = 9BAA82A41D451A0E00E5B98A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9BAA82A21D451A0E00E5B98A /* RunloopAndThread */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9BAA82A11D451A0E00E5B98A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9BAA82B61D451A0E00E5B98A /* LaunchScreen.storyboard in Resources */, - 9BAA82B31D451A0E00E5B98A /* Assets.xcassets in Resources */, - 9BAA82B11D451A0E00E5B98A /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9BAA829F1D451A0E00E5B98A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9BAA82AE1D451A0E00E5B98A /* ViewController.m in Sources */, - 9BAA82AB1D451A0E00E5B98A /* AppDelegate.m in Sources */, - 9BAA82A81D451A0E00E5B98A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 9BAA82AF1D451A0E00E5B98A /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 9BAA82B01D451A0E00E5B98A /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 9BAA82B41D451A0E00E5B98A /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 9BAA82B51D451A0E00E5B98A /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 9BAA82B81D451A0E00E5B98A /* 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; - }; - 9BAA82B91D451A0E00E5B98A /* 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; - }; - 9BAA82BB1D451A0E00E5B98A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = RunloopAndThread/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = baidu.RunloopAndThread; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 9BAA82BC1D451A0E00E5B98A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = RunloopAndThread/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = baidu.RunloopAndThread; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9BAA829E1D451A0E00E5B98A /* Build configuration list for PBXProject "RunloopAndThread" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9BAA82B81D451A0E00E5B98A /* Debug */, - 9BAA82B91D451A0E00E5B98A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9BAA82BA1D451A0E00E5B98A /* Build configuration list for PBXNativeTarget "RunloopAndThread" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9BAA82BB1D451A0E00E5B98A /* Debug */, - 9BAA82BC1D451A0E00E5B98A /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 9BAA829B1D451A0E00E5B98A /* Project object */; -} diff --git a/RunloopAndThread/RunloopAndThread/AppDelegate.h b/RunloopAndThread/RunloopAndThread/AppDelegate.h deleted file mode 100644 index fe7f9b2..0000000 --- a/RunloopAndThread/RunloopAndThread/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.h -// RunloopAndThread -// -// Created by 张星宇 on 16/7/24. -// Copyright © 2016年 bestswifter. All rights reserved. -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - - -@end - diff --git a/RunloopAndThread/RunloopAndThread/AppDelegate.m b/RunloopAndThread/RunloopAndThread/AppDelegate.m deleted file mode 100644 index abb96e3..0000000 --- a/RunloopAndThread/RunloopAndThread/AppDelegate.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// AppDelegate.m -// RunloopAndThread -// -// Created by 张星宇 on 16/7/24. -// Copyright © 2016年 bestswifter. 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 diff --git a/RunloopAndThread/RunloopAndThread/Assets.xcassets/AppIcon.appiconset/Contents.json b/RunloopAndThread/RunloopAndThread/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f..0000000 --- a/RunloopAndThread/RunloopAndThread/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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" - } -} \ No newline at end of file diff --git a/RunloopAndThread/RunloopAndThread/Base.lproj/LaunchScreen.storyboard b/RunloopAndThread/RunloopAndThread/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1..0000000 --- a/RunloopAndThread/RunloopAndThread/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RunloopAndThread/RunloopAndThread/Base.lproj/Main.storyboard b/RunloopAndThread/RunloopAndThread/Base.lproj/Main.storyboard deleted file mode 100644 index f56d2f3..0000000 --- a/RunloopAndThread/RunloopAndThread/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RunloopAndThread/RunloopAndThread/Info.plist b/RunloopAndThread/RunloopAndThread/Info.plist deleted file mode 100644 index 6905cc6..0000000 --- a/RunloopAndThread/RunloopAndThread/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/RunloopAndThread/RunloopAndThread/ViewController.h b/RunloopAndThread/RunloopAndThread/ViewController.h deleted file mode 100644 index 52f0228..0000000 --- a/RunloopAndThread/RunloopAndThread/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// RunloopAndThread -// -// Created by 张星宇 on 16/7/24. -// Copyright © 2016年 bestswifter. All rights reserved. -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/RunloopAndThread/RunloopAndThread/ViewController.m b/RunloopAndThread/RunloopAndThread/ViewController.m deleted file mode 100644 index c3d8721..0000000 --- a/RunloopAndThread/RunloopAndThread/ViewController.m +++ /dev/null @@ -1,105 +0,0 @@ -// -// ViewController.m -// RunloopAndThread -// -// Created by 张星宇 on 16/7/24. -// Copyright © 2016年 bestswifter. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@property (strong, nonatomic) NSPort *emptyPort; -@property (strong, nonatomic) NSThread *thread; -@property (assign, nonatomic) BOOL shouldKeepRunning; - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; -// [self memoryTest]; -// [self runloopTest]; -} - -#pragma --mark 内存占用测试 -- (void)memoryTest { - for (int i = 0; i < 100000; ++i) { - NSThread *thread = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil]; - [thread start]; - [self performSelector:@selector(stopThread) onThread:thread withObject:nil waitUntilDone:YES]; - } -} - -- (void)stopThread { - CFRunLoopStop(CFRunLoopGetCurrent()); - NSThread *thread = [NSThread currentThread]; - [thread cancel]; -} - -- (void)run { - @autoreleasepool { - NSLog(@"current thread = %@", [NSThread currentThread]); - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - if (!self.emptyPort) { - self.emptyPort = [NSMachPort port]; - } - [runLoop addPort:self.emptyPort forMode:NSDefaultRunLoopMode]; - // 下面这两种写法都不可取 -// [runLoop run]; -// [runLoop runMode:NSRunLoopCommonModes beforeDate:[NSDate distantFuture]]; - CFRunLoopRun(); - } -} - -# pragma --mark runloop 启动与退出测试 -- (void)runloopTest { - // 绘制按钮,点击按钮后关闭 runloop - UIButton *stopButton = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; - [stopButton setTitle:@"Stop Timer" forState:UIControlStateNormal]; - [stopButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; - [self.view addSubview:stopButton]; - [stopButton addTarget:self action:@selector(stopButtonDidClicked:) forControlEvents:UIControlEventTouchUpInside]; - -// self.shouldKeepRunning = YES; - - self.thread = [[NSThread alloc] initWithTarget:self selector:@selector(singleThread) object:nil]; - [self.thread start]; - [self performSelector:@selector(printSomething) onThread:self.thread withObject:nil waitUntilDone:YES]; -} - -- (void)singleThread { - @autoreleasepool { - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - if (!self.emptyPort) { - self.emptyPort = [NSMachPort port]; - } - [runLoop addPort:self.emptyPort forMode:NSDefaultRunLoopMode]; - CFRunLoopRun(); -// while (_shouldKeepRunning && [runLoop runMode:NSRunLoopCommonModes beforeDate:[NSDate distantFuture]]); - } -} - -- (void)printSomething { - NSLog(@"current thread = %@", [NSThread currentThread]); - [self performSelector:@selector(printSomething) withObject:nil afterDelay:1]; -} - -#pragma --mark 点击按钮退出 -- (void)stopButtonDidClicked:(id)sender { - [self performSelector:@selector(stopRunloop) onThread:self.thread withObject:nil waitUntilDone:YES]; -} - -- (void)stopRunloop { - // self.shouldKeepRunning = NO; - CFRunLoopStop(CFRunLoopGetCurrent()); -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/RunloopAndThread/RunloopAndThread/main.m b/RunloopAndThread/RunloopAndThread/main.m deleted file mode 100644 index 69bcf1c..0000000 --- a/RunloopAndThread/RunloopAndThread/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// RunloopAndThread -// -// Created by 张星宇 on 16/7/24. -// Copyright © 2016年 bestswifter. All rights reserved. -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} From f9e360c31309665bdf21f5f5a6e29cf8cd199d6a Mon Sep 17 00:00:00 2001 From: isLineMe <1101157577@qq.com> Date: Thu, 30 Nov 2017 10:25:55 +0800 Subject: [PATCH 7/7] delect text --- text.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 text.txt diff --git a/text.txt b/text.txt deleted file mode 100644 index f3a3485..0000000 --- a/text.txt +++ /dev/null @@ -1 +0,0 @@ -text \ No newline at end of file