Skip to content

Commit 3619884

Browse files
committed
example code bug fix
1 parent 320bb87 commit 3619884

File tree

7 files changed

+11
-39
lines changed

7 files changed

+11
-39
lines changed

Examples/objective-c/TCMaskBlendExample/TCMaskBlendExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@
269269
750E14461E51B3860057E0D0 /* Debug */ = {
270270
isa = XCBuildConfiguration;
271271
buildSettings = {
272+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
272273
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
273274
FRAMEWORK_SEARCH_PATHS = (
274275
"$(inherited)",
@@ -285,6 +286,7 @@
285286
750E14471E51B3860057E0D0 /* Release */ = {
286287
isa = XCBuildConfiguration;
287288
buildSettings = {
289+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
288290
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289291
FRAMEWORK_SEARCH_PATHS = (
290292
"$(inherited)",
@@ -317,6 +319,7 @@
317319
750E14471E51B3860057E0D0 /* Release */,
318320
);
319321
defaultConfigurationIsVisible = 0;
322+
defaultConfigurationName = Release;
320323
};
321324
/* End XCConfigurationList section */
322325
};

Examples/objective-c/TCMaskCustomization/TCMaskCustomization.xcodeproj/project.pbxproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@
1616
750E147E1E51DD410057E0D0 /* Balloon.JPEG in Resources */ = {isa = PBXBuildFile; fileRef = 750E147D1E51DD410057E0D0 /* Balloon.JPEG */; };
1717
/* End PBXBuildFile section */
1818

19-
/* Begin PBXCopyFilesBuildPhase section */
20-
75F7B2281E6D2D4500A8774F /* Embed Frameworks */ = {
21-
isa = PBXCopyFilesBuildPhase;
22-
buildActionMask = 2147483647;
23-
dstPath = "";
24-
dstSubfolderSpec = 10;
25-
files = (
26-
);
27-
name = "Embed Frameworks";
28-
runOnlyForDeploymentPostprocessing = 0;
29-
};
30-
/* End PBXCopyFilesBuildPhase section */
31-
3219
/* Begin PBXFileReference section */
3320
750E145C1E51DB780057E0D0 /* TCMaskCustomization.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TCMaskCustomization.app; sourceTree = BUILT_PRODUCTS_DIR; };
3421
750E14601E51DB780057E0D0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -105,7 +92,6 @@
10592
750E14581E51DB780057E0D0 /* Sources */,
10693
750E14591E51DB780057E0D0 /* Frameworks */,
10794
750E145A1E51DB780057E0D0 /* Resources */,
108-
75F7B2281E6D2D4500A8774F /* Embed Frameworks */,
10995
);
11096
buildRules = (
11197
);

Examples/objective-c/TCMaskNavigationView/TCMaskNavigationView.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,13 @@
275275
750E140A1E5184E20057E0D0 /* Debug */ = {
276276
isa = XCBuildConfiguration;
277277
buildSettings = {
278+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
278279
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
279280
FRAMEWORK_SEARCH_PATHS = (
280281
"$(inherited)",
281282
"$(PROJECT_DIR)",
282283
);
283-
HEADER_SEARCH_PATHS = "";
284+
HEADER_SEARCH_PATHS = "$(inherited)";
284285
INFOPLIST_FILE = TCMaskNavigationView/Info.plist;
285286
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
286287
PRODUCT_BUNDLE_IDENTIFIER = com.TinyCrayon.TCMaskNavigationView;
@@ -291,12 +292,13 @@
291292
750E140B1E5184E20057E0D0 /* Release */ = {
292293
isa = XCBuildConfiguration;
293294
buildSettings = {
295+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
294296
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
295297
FRAMEWORK_SEARCH_PATHS = (
296298
"$(inherited)",
297299
"$(PROJECT_DIR)",
298300
);
299-
HEADER_SEARCH_PATHS = "";
301+
HEADER_SEARCH_PATHS = "$(inherited)";
300302
INFOPLIST_FILE = TCMaskNavigationView/Info.plist;
301303
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
302304
PRODUCT_BUNDLE_IDENTIFIER = com.TinyCrayon.TCMaskNavigationView;

Examples/objective-c/TCMaskNavigationView/TCMaskNavigationView/MainViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking
5555
- (UIViewController *)tcMaskViewWillPushViewControllerWithMask:(TCMask *)mask image:(UIImage *)image {
5656
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
5757
ConfirmViewController *controller = [storyBoard instantiateViewControllerWithIdentifier:@"confirmViewController"];
58-
controller.image = image;
58+
controller.image = [mask cutoutWithImage:image resize:true];
5959
return controller;
6060
}
6161

Examples/objective-c/TCMaskPopView/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ source 'https://github.com/CocoaPods/Specs.git'
33
platform :ios, '10.0'
44
use_frameworks!
55

6-
target 'TCMaskBlendExample' do
6+
target 'TCMaskPopView' do
77
pod 'TinyCrayon'
88
end

Examples/objective-c/TCMaskPopView/TCMaskPopView/ViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ - (void)presentTCMaskView {
4444
[maskView presentFromRootViewController:self animated:true];
4545
}
4646

47-
- (void)tcMaskViewDidCompleteWithImage:(UIImage *)image mask:(TCMask *)mask {
48-
_imageView.image = [mask cutoutImageWithImage:image resize:true];
47+
- (void)tcMaskViewDidCompleteWithMask:(TCMask *)mask image:(UIImage *)image {
48+
_imageView.image = [mask cutoutWithImage:image resize:true];
4949
}
5050

5151
@end

Examples/swift/TCMaskNavigationView/TCMaskNavigationView.xcodeproj/project.pbxproj

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
751A7EEA1E6425DC00C449C5 /* TCMask.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 751A7EE71E6425D400C449C5 /* TCMask.framework */; };
11-
751A7EEB1E6425DC00C449C5 /* TCMask.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 751A7EE71E6425D400C449C5 /* TCMask.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1210
75A0A6E71E2463B5005B36B7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75A0A6E61E2463B5005B36B7 /* AppDelegate.swift */; };
1311
75A0A6EC1E2463B5005B36B7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 75A0A6EA1E2463B5005B36B7 /* Main.storyboard */; };
1412
75A0A6EE1E2463B5005B36B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 75A0A6ED1E2463B5005B36B7 /* Assets.xcassets */; };
@@ -17,22 +15,7 @@
1715
75A0A6FC1E246852005B36B7 /* ConfirmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75A0A6FB1E246852005B36B7 /* ConfirmViewController.swift */; };
1816
/* End PBXBuildFile section */
1917

20-
/* Begin PBXCopyFilesBuildPhase section */
21-
751A7EEC1E6425DC00C449C5 /* Embed Frameworks */ = {
22-
isa = PBXCopyFilesBuildPhase;
23-
buildActionMask = 2147483647;
24-
dstPath = "";
25-
dstSubfolderSpec = 10;
26-
files = (
27-
751A7EEB1E6425DC00C449C5 /* TCMask.framework in Embed Frameworks */,
28-
);
29-
name = "Embed Frameworks";
30-
runOnlyForDeploymentPostprocessing = 0;
31-
};
32-
/* End PBXCopyFilesBuildPhase section */
33-
3418
/* Begin PBXFileReference section */
35-
751A7EE71E6425D400C449C5 /* TCMask.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TCMask.framework; path = "/Users/xinzeng/Desktop/TinyCrayon-iOS-SDK/Examples/swift/TCMaskNavigationView/TCMask.framework"; sourceTree = "<absolute>"; };
3619
75A0A6E31E2463B5005B36B7 /* TCMaskNavigationView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TCMaskNavigationView.app; sourceTree = BUILT_PRODUCTS_DIR; };
3720
75A0A6E61E2463B5005B36B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3821
75A0A6EB1E2463B5005B36B7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -48,7 +31,6 @@
4831
isa = PBXFrameworksBuildPhase;
4932
buildActionMask = 2147483647;
5033
files = (
51-
751A7EEA1E6425DC00C449C5 /* TCMask.framework in Frameworks */,
5234
);
5335
runOnlyForDeploymentPostprocessing = 0;
5436
};
@@ -95,7 +77,6 @@
9577
75A0A6DF1E2463B5005B36B7 /* Sources */,
9678
75A0A6E01E2463B5005B36B7 /* Frameworks */,
9779
75A0A6E11E2463B5005B36B7 /* Resources */,
98-
751A7EEC1E6425DC00C449C5 /* Embed Frameworks */,
9980
);
10081
buildRules = (
10182
);

0 commit comments

Comments
 (0)