Skip to content

Commit

Permalink
jzz test
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhenzhong committed Jun 24, 2019
1 parent 9fd4886 commit 31bab96
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 6 deletions.
78 changes: 75 additions & 3 deletions FM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
9E688085F506E395D5F6B319 /* Pods_FM.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BB0BC886CC394159D83BA8 /* Pods_FM.framework */; };
B23A9486229CE0D7001FD309 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B23A9485229CE0D7001FD309 /* AppDelegate.m */; };
B23A9489229CE0D7001FD309 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B23A9488229CE0D7001FD309 /* ViewController.m */; };
B23A948C229CE0D7001FD309 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B23A948A229CE0D7001FD309 /* Main.storyboard */; };
B23A948F229CE0D7001FD309 /* FM.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = B23A948D229CE0D7001FD309 /* FM.xcdatamodeld */; };
B23A9491229CE0D8001FD309 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B23A9490229CE0D8001FD309 /* Assets.xcassets */; };
B23A9494229CE0D8001FD309 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B23A9492229CE0D8001FD309 /* LaunchScreen.storyboard */; };
B23A9497229CE0D8001FD309 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B23A9496229CE0D8001FD309 /* main.m */; };
B2D8136E22B7992D00A9AD47 /* ZZBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = B2D8136D22B7992D00A9AD47 /* ZZBlock.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1A7A743B4371ED0C9C1F0837 /* Pods-FM.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FM.release.xcconfig"; path = "Pods/Target Support Files/Pods-FM/Pods-FM.release.xcconfig"; sourceTree = "<group>"; };
4AB6A92BFC8BF3DE3684394E /* Pods-FM.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FM.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FM/Pods-FM.debug.xcconfig"; sourceTree = "<group>"; };
81BB0BC886CC394159D83BA8 /* Pods_FM.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FM.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B23A9481229CE0D7001FD309 /* FM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FM.app; sourceTree = BUILT_PRODUCTS_DIR; };
B23A9484229CE0D7001FD309 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
B23A9485229CE0D7001FD309 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -28,24 +33,37 @@
B23A9493229CE0D8001FD309 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
B23A9495229CE0D8001FD309 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B23A9496229CE0D8001FD309 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
B2D8136C22B7992D00A9AD47 /* ZZBlock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZZBlock.h; sourceTree = "<group>"; };
B2D8136D22B7992D00A9AD47 /* ZZBlock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZZBlock.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B23A947E229CE0D7001FD309 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9E688085F506E395D5F6B319 /* Pods_FM.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
6B6FC2DB653F1CAA65407512 /* Frameworks */ = {
isa = PBXGroup;
children = (
81BB0BC886CC394159D83BA8 /* Pods_FM.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
B23A9478229CE0D7001FD309 = {
isa = PBXGroup;
children = (
B23A9483229CE0D7001FD309 /* FM */,
B23A9482229CE0D7001FD309 /* Products */,
CC4ED8D5544830AA3EE43FD5 /* Pods */,
6B6FC2DB653F1CAA65407512 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -70,20 +88,33 @@
B23A9495229CE0D8001FD309 /* Info.plist */,
B23A9496229CE0D8001FD309 /* main.m */,
B23A948D229CE0D7001FD309 /* FM.xcdatamodeld */,
B2D8136C22B7992D00A9AD47 /* ZZBlock.h */,
B2D8136D22B7992D00A9AD47 /* ZZBlock.m */,
);
path = FM;
sourceTree = "<group>";
};
CC4ED8D5544830AA3EE43FD5 /* Pods */ = {
isa = PBXGroup;
children = (
4AB6A92BFC8BF3DE3684394E /* Pods-FM.debug.xcconfig */,
1A7A743B4371ED0C9C1F0837 /* Pods-FM.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
B23A9480229CE0D7001FD309 /* FM */ = {
isa = PBXNativeTarget;
buildConfigurationList = B23A949A229CE0D8001FD309 /* Build configuration list for PBXNativeTarget "FM" */;
buildPhases = (
8CF353C8885D468C855D5FBF /* [CP] Check Pods Manifest.lock */,
B23A947D229CE0D7001FD309 /* Sources */,
B23A947E229CE0D7001FD309 /* Frameworks */,
B23A947F229CE0D7001FD309 /* Resources */,
F390EC4A2C982FDDB6C621A0 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -139,6 +170,44 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
8CF353C8885D468C855D5FBF /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FM-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F390EC4A2C982FDDB6C621A0 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FM/Pods-FM-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FM/Pods-FM-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FM/Pods-FM-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
B23A947D229CE0D7001FD309 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand All @@ -147,6 +216,7 @@
B23A9489229CE0D7001FD309 /* ViewController.m in Sources */,
B23A9486229CE0D7001FD309 /* AppDelegate.m in Sources */,
B23A9497229CE0D8001FD309 /* main.m in Sources */,
B2D8136E22B7992D00A9AD47 /* ZZBlock.m in Sources */,
B23A948F229CE0D7001FD309 /* FM.xcdatamodeld in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -224,7 +294,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -277,7 +347,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -287,6 +357,7 @@
};
B23A949B229CE0D8001FD309 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4AB6A92BFC8BF3DE3684394E /* Pods-FM.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -304,6 +375,7 @@
};
B23A949C229CE0D8001FD309 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1A7A743B4371ED0C9C1F0837 /* Pods-FM.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>FM.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>3</integer>
</dict>
</dict>
</dict>
Expand Down
11 changes: 9 additions & 2 deletions FM/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,24 @@
//

#import "ViewController.h"
#import "ZZBlock.h"

@interface ViewController ()

@end

@implementation ViewController
@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.

}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
ZZBlock * block = [[ZZBlock alloc] init];
[block downloadWithBlock:^(NSString * _Nonnull str) {
NSLog(@"%@",str);
}];
}

@end
21 changes: 21 additions & 0 deletions FM/ZZBlock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// ZZBlock.h
// FM
//
// Created by 金振中 on 2019/6/17.
// Copyright © 2019 金振中. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^downloadBlock)(NSString *str);

@interface ZZBlock : NSObject
@property (nonatomic,copy) downloadBlock blk;

- (void)downloadWithBlock:(downloadBlock)block;
@end

NS_ASSUME_NONNULL_END
20 changes: 20 additions & 0 deletions FM/ZZBlock.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// ZZBlock.m
// FM
//
// Created by 金振中 on 2019/6/17.
// Copyright © 2019 金振中. All rights reserved.
//

#import "ZZBlock.h"

@implementation ZZBlock

- (void)downloadWithBlock:(downloadBlock)block{
if (block) {
self.blk = block;
self.blk(@"1236");
}
}

@end

0 comments on commit 31bab96

Please sign in to comment.