Skip to content

Commit 320bb87

Browse files
committed
Update TCMaskCustomization for SDK 2.0.0
1 parent 505913e commit 320bb87

File tree

4 files changed

+49
-44
lines changed

4 files changed

+49
-44
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@
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+
1932
/* Begin PBXFileReference section */
2033
750E145C1E51DB780057E0D0 /* TCMaskCustomization.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TCMaskCustomization.app; sourceTree = BUILT_PRODUCTS_DIR; };
2134
750E14601E51DB780057E0D0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -92,6 +105,7 @@
92105
750E14581E51DB780057E0D0 /* Sources */,
93106
750E14591E51DB780057E0D0 /* Frameworks */,
94107
750E145A1E51DB780057E0D0 /* Resources */,
108+
75F7B2281E6D2D4500A8774F /* Embed Frameworks */,
95109
);
96110
buildRules = (
97111
);
@@ -273,6 +287,7 @@
273287
750E14741E51DB780057E0D0 /* Debug */ = {
274288
isa = XCBuildConfiguration;
275289
buildSettings = {
290+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
276291
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277292
FRAMEWORK_SEARCH_PATHS = (
278293
"$(inherited)",
@@ -288,6 +303,7 @@
288303
750E14751E51DB780057E0D0 /* Release */ = {
289304
isa = XCBuildConfiguration;
290305
buildSettings = {
306+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
291307
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
292308
FRAMEWORK_SEARCH_PATHS = (
293309
"$(inherited)",

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

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,20 @@ - (void)preSentTCMaskView {
5151
maskView.delegate = self;
5252

5353
// Change status bar style
54-
maskView.statusBarStyle = UIStatusBarStyleDefault;
54+
maskView.statusBarStyle = UIStatusBarStyleLightContent;
5555

5656
// Change UI components style
57-
UIColor *tintColor = [[UIColor alloc] initWithRed:0 green:122.0/255.0 blue:1 alpha:1];
58-
maskView.topBar.backgroundColor = [[UIColor alloc] initWithWhite:247.0/255.0 alpha:1];
59-
maskView.topBar.tintColor = tintColor;
57+
maskView.topBar.backgroundColor = [[UIColor alloc] initWithWhite:0.1 alpha:1];
58+
maskView.topBar.tintColor = [UIColor whiteColor];
6059

61-
maskView.imageView.backgroundColor = [[UIColor alloc] initWithWhite:231.0/255.0 alpha:1];
62-
maskView.imageView.tintColor = tintColor;
60+
maskView.imageView.backgroundColor = [[UIColor alloc] initWithWhite:0.2 alpha:1];
6361

64-
maskView.toolPanel.backgroundColor = [UIColor whiteColor];
65-
maskView.toolPanel.tintColor = tintColor;
66-
maskView.toolPanel.highlightedColor = [[UIColor alloc] initWithWhite:231.0/255.0 alpha:1];
67-
maskView.toolPanel.textColor = tintColor;
62+
maskView.bottomBar.backgroundColor = [[UIColor alloc] initWithWhite:0.1 alpha:1];
63+
maskView.bottomBar.tintColor = [UIColor whiteColor];
64+
maskView.bottomBar.textColor = [UIColor whiteColor];
6865

69-
maskView.bottomBar.backgroundColor = [[UIColor alloc] initWithWhite:247.0/255.0 alpha:1];
70-
maskView.bottomBar.tintColor = tintColor;
71-
maskView.bottomBar.textColor = tintColor;
72-
maskView.bottomBar.highlightedColor = [UIColor whiteColor];
73-
74-
maskView.settingView.backgroundColor = [UIColor whiteColor];
75-
maskView.settingView.tintColor = tintColor;
76-
maskView.settingView.textColor = [UIColor blackColor];
77-
78-
maskView.settingViewTopBar.backgroundColor = [[UIColor alloc] initWithWhite:247.0/255.0 alpha:1];
79-
maskView.settingViewTopBar.tintColor = tintColor;
80-
maskView.settingViewTopBar.textColor = [UIColor blackColor];
66+
maskView.settingView.backgroundColor = [[UIColor alloc] initWithWhite:0.8 alpha:0.9];
67+
maskView.settingView.textColor = [[UIColor alloc] initWithWhite:0.33 alpha:1];
8168

8269
// Create a customized view mode with gray scale image
8370
UIImage *grayScaleImage = [image convertToGrayScaleNoAlpha];

Examples/swift/TCMaskCustomization/TCMaskCustomization.xcodeproj/project.pbxproj

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

18+
/* Begin PBXCopyFilesBuildPhase section */
19+
75F7B21E1E6D21E600A8774F /* Embed Frameworks */ = {
20+
isa = PBXCopyFilesBuildPhase;
21+
buildActionMask = 2147483647;
22+
dstPath = "";
23+
dstSubfolderSpec = 10;
24+
files = (
25+
);
26+
name = "Embed Frameworks";
27+
runOnlyForDeploymentPostprocessing = 0;
28+
};
29+
/* End PBXCopyFilesBuildPhase section */
30+
1831
/* Begin PBXFileReference section */
1932
750E13CA1E5176A00057E0D0 /* TCMaskCustomization.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TCMaskCustomization.app; sourceTree = BUILT_PRODUCTS_DIR; };
2033
750E13CD1E5176A00057E0D0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -77,6 +90,7 @@
7790
750E13C61E5176A00057E0D0 /* Sources */,
7891
750E13C71E5176A00057E0D0 /* Frameworks */,
7992
750E13C81E5176A00057E0D0 /* Resources */,
93+
75F7B21E1E6D21E600A8774F /* Embed Frameworks */,
8094
);
8195
buildRules = (
8296
);
@@ -309,6 +323,7 @@
309323
750E13DE1E5176A00057E0D0 /* Release */,
310324
);
311325
defaultConfigurationIsVisible = 0;
326+
defaultConfigurationName = Release;
312327
};
313328
/* End XCConfigurationList section */
314329
};

Examples/swift/TCMaskCustomization/TCMaskCustomization/ViewController.swift

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,20 @@ class ViewController: UIViewController, TCMaskViewDelegate {
4545
maskView.delegate = self
4646

4747
// Change status bar style
48-
maskView.statusBarStyle = UIStatusBarStyle.default
48+
maskView.statusBarStyle = UIStatusBarStyle.lightContent
4949

5050
// Change UI components style
51-
let tintColor = UIColor(red: 0, green: 122.0/255.0, blue: 1, alpha: 1)
52-
maskView.topBar.backgroundColor = UIColor(white: 247.0/255.0, alpha: 1)
53-
maskView.topBar.tintColor = tintColor
51+
maskView.topBar.backgroundColor = UIColor(white: 0.1, alpha: 1)
52+
maskView.topBar.tintColor = UIColor.white
5453

55-
maskView.imageView.backgroundColor = UIColor(white: 231.0/255.0, alpha: 1)
56-
maskView.imageView.tintColor = tintColor
54+
maskView.imageView.backgroundColor = UIColor(white: 0.2, alpha: 1)
5755

58-
maskView.toolPanel.backgroundColor = UIColor.white
59-
maskView.toolPanel.tintColor = tintColor
60-
maskView.toolPanel.highlightedColor = UIColor(white: 231.0/255.0, alpha: 1)
61-
maskView.toolPanel.textColor = tintColor
56+
maskView.bottomBar.backgroundColor = UIColor(white: 0.1, alpha: 1)
57+
maskView.bottomBar.tintColor = UIColor.white
58+
maskView.bottomBar.textColor = UIColor.white
6259

63-
maskView.bottomBar.backgroundColor = UIColor(white: 247.0/255.0, alpha: 1)
64-
maskView.bottomBar.tintColor = tintColor
65-
maskView.bottomBar.textColor = tintColor
66-
maskView.bottomBar.highlightedColor = UIColor.white
67-
68-
maskView.settingView.backgroundColor = UIColor.white
69-
maskView.settingView.tintColor = tintColor
70-
maskView.settingView.textColor = UIColor.black
71-
72-
maskView.settingViewTopBar.backgroundColor = UIColor(white: 247.0/255.0, alpha: 1)
73-
maskView.settingViewTopBar.tintColor = tintColor
74-
maskView.settingViewTopBar.textColor = UIColor.black
60+
maskView.settingView.backgroundColor = UIColor(white: 0.8, alpha: 0.9)
61+
maskView.settingView.textColor = UIColor(white: 0.33, alpha: 1)
7562

7663
// Create a customized view mode with gray scale image
7764
let grayScaleImage = image.convertToGrayScaleNoAlpha()

0 commit comments

Comments
 (0)