├── .gitignore ├── .swift-version ├── .travis.yml ├── Example ├── MaskingLayer.podspec ├── MaskingLayer.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── MaskingLayer-Example.xcscheme ├── MaskingLayer.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── MaskingLayer │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Camera.storyboard │ ├── CameraViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Mask.png │ │ │ ├── Mask@2x-1.png │ │ │ ├── Mask@2x-2.png │ │ │ ├── Mask@2x-3.png │ │ │ ├── Mask@2x.png │ │ │ ├── Mask@3x-1.png │ │ │ ├── Mask@3x-2.png │ │ │ ├── Mask@3x-3.png │ │ │ └── Mask@3x.png │ │ ├── Contents.json │ │ ├── IMG_4011.imageset │ │ │ ├── Contents.json │ │ │ └── IMG_4011.jpg │ │ ├── Mask.imageset │ │ │ ├── Contents.json │ │ │ └── Mask.png │ │ └── Reset.imageset │ │ │ ├── Contents.json │ │ │ ├── Rest.png │ │ │ ├── Rest@2x.png │ │ │ └── Rest@3x.png │ ├── Info.plist │ ├── MaskButtonView.swift │ ├── SceneDelegate.swift │ ├── TabBarController.swift │ ├── ViewController+Extension.swift │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Manifest.lock │ ├── MaskingLayer │ │ ├── LICENSE │ │ ├── Pods │ │ │ └── MaskingLayer │ │ │ │ └── Classes │ │ │ │ ├── DefalutExtension │ │ │ │ └── MaskExtension.swift │ │ │ │ ├── MaskProtocol │ │ │ │ └── MaskProtocol.swift │ │ │ │ ├── Model │ │ │ │ ├── MaskCollectionDelegateModel.swift │ │ │ │ ├── MaskFilterBuiltinsMatte.swift │ │ │ │ ├── MaskObservable.swift │ │ │ │ ├── MaskPortraitMatte.swift │ │ │ │ └── MaskingLayerModel.swift │ │ │ │ ├── PathStruct │ │ │ │ └── PathStruct.swift │ │ │ │ ├── Util │ │ │ │ ├── MaskGesture.swift │ │ │ │ └── MaskImagePicker.swift │ │ │ │ ├── View │ │ │ │ ├── MaskingLayerModelView.swift │ │ │ │ ├── SliiderObjectsView.swift │ │ │ │ └── SliiderObjectsView.xib │ │ │ │ └── ViwModel │ │ │ │ ├── MaskGestureViewModel.swift │ │ │ │ ├── MaskLayer.swift │ │ │ │ └── MaskingLayerViewModel.swift │ │ └── README.md │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── MaskingLayer │ │ ├── MaskingLayer-Info.plist │ │ ├── MaskingLayer-dummy.m │ │ ├── MaskingLayer-prefix.pch │ │ ├── MaskingLayer-umbrella.h │ │ ├── MaskingLayer.debug.xcconfig │ │ ├── MaskingLayer.modulemap │ │ └── MaskingLayer.release.xcconfig │ │ └── Pods-MaskingLayer_Example │ │ ├── Pods-MaskingLayer_Example-Info.plist │ │ ├── Pods-MaskingLayer_Example-acknowledgements.markdown │ │ ├── Pods-MaskingLayer_Example-acknowledgements.plist │ │ ├── Pods-MaskingLayer_Example-dummy.m │ │ ├── Pods-MaskingLayer_Example-frameworks.sh │ │ ├── Pods-MaskingLayer_Example-umbrella.h │ │ ├── Pods-MaskingLayer_Example.debug.xcconfig │ │ ├── Pods-MaskingLayer_Example.modulemap │ │ └── Pods-MaskingLayer_Example.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── MaskImage.png ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/MaskingLayer.xcworkspace -scheme MaskingLayer-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/MaskingLayer.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint MaskingLayer.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'MaskingLayer' 11 | s.version = '2.4.0' 12 | s.summary = 'The traced part is masked.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/daisukenagata/MaskingLayer' 25 | s.license = { :type => 'MIT', :file => 'LICENSE' } 26 | s.author = { 'daisukenagata' => 'dbank0208@gmail.com' } 27 | s.source = { :git => 'https://github.com/daisukenagata/MaskingLayer.git', :tag => s.version.to_s } 28 | # s.social_media_url = 'https://twitter.com/dbank0208' 29 | 30 | s.ios.deployment_target = '14.4' 31 | s.swift_version = '5.3' 32 | s.source_files = 'Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/**/*' 33 | 34 | # s.resource_bundles = { 35 | # 'MaskingLayer' => ['MaskingLayer/Assets/*.png'] 36 | # } 37 | 38 | # s.public_header_files = 'Pod/Classes/**/*.h' 39 | # s.frameworks = 'UIKit', 'MapKit' 40 | # s.dependency 'AFNetworking', '~> 2.3' 41 | end 42 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 12 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 13 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 14 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 15 | 777509BEC4649E9572A8F42A /* Pods_MaskingLayer_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D72988AF295E85CE6B80CB51 /* Pods_MaskingLayer_Example.framework */; }; 16 | BB4207F2237578F1005EE595 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4207F1237578F1005EE595 /* SceneDelegate.swift */; }; 17 | BB4207F4237584E0005EE595 /* MaskButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4207F3237584E0005EE595 /* MaskButtonView.swift */; }; 18 | BB4207F623758552005EE595 /* Camera.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB4207F523758552005EE595 /* Camera.storyboard */; }; 19 | BB4207F823758570005EE595 /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4207F723758570005EE595 /* CameraViewController.swift */; }; 20 | BB6F894A215178E3008986BA /* MaskingLayer.podspec in Resources */ = {isa = PBXBuildFile; fileRef = BB6F8949215178E3008986BA /* MaskingLayer.podspec */; }; 21 | BB6F89542152E554008986BA /* MaskingLayer_ExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6F89532152E554008986BA /* MaskingLayer_ExampleUITests.swift */; }; 22 | BB6F89622152E56A008986BA /* MaskingLayer_ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB6F89612152E56A008986BA /* MaskingLayer_ExampleTests.swift */; }; 23 | BBBE209A25FC837800BE7F18 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBE209925FC837800BE7F18 /* TabBarController.swift */; }; 24 | BBC88249237ECB33007C3F17 /* ViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC88248237ECB33007C3F17 /* ViewController+Extension.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | BB6F89562152E554008986BA /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 33 | remoteInfo = MaskingLayer_Example; 34 | }; 35 | BB6F89642152E56A008986BA /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 40 | remoteInfo = MaskingLayer_Example; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 185EDAAFB0512F5B65133AA7 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 46 | 5B98B6A3ED6858DDA461DAF1 /* Pods_MaskingLayer_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MaskingLayer_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 607FACD01AFB9204008FA782 /* MaskingLayer_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MaskingLayer_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 50 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 51 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 53 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 54 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 56 | 6B809DBE01A68FD431E007A6 /* Pods-MaskingLayer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MaskingLayer_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.release.xcconfig"; sourceTree = ""; }; 57 | 8C3EB22E58F46940F047EDD1 /* Pods-MaskingLayer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MaskingLayer_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.debug.xcconfig"; sourceTree = ""; }; 58 | 9E24F33CE01566D0C7B22AE8 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 59 | BB4207F1237578F1005EE595 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 60 | BB4207F3237584E0005EE595 /* MaskButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskButtonView.swift; sourceTree = ""; }; 61 | BB4207F523758552005EE595 /* Camera.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Camera.storyboard; sourceTree = ""; }; 62 | BB4207F723758570005EE595 /* CameraViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; }; 63 | BB6F8949215178E3008986BA /* MaskingLayer.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MaskingLayer.podspec; sourceTree = ""; }; 64 | BB6F89512152E554008986BA /* MaskingLayer_ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaskingLayer_ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | BB6F89532152E554008986BA /* MaskingLayer_ExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaskingLayer_ExampleUITests.swift; sourceTree = ""; }; 66 | BB6F89552152E554008986BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | BB6F895F2152E56A008986BA /* MaskingLayer_ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaskingLayer_ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | BB6F89612152E56A008986BA /* MaskingLayer_ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaskingLayer_ExampleTests.swift; sourceTree = ""; }; 69 | BB6F89632152E56A008986BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | BBBE209925FC837800BE7F18 /* TabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = ""; }; 71 | BBC88248237ECB33007C3F17 /* ViewController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+Extension.swift"; sourceTree = ""; }; 72 | C2788196BAAF3112A92117DF /* Pods-MaskingLayer_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MaskingLayer_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MaskingLayer_Tests/Pods-MaskingLayer_Tests.debug.xcconfig"; sourceTree = ""; }; 73 | D3D5A22610BE6E7EA650D89D /* Pods-MaskingLayer_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MaskingLayer_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MaskingLayer_Tests/Pods-MaskingLayer_Tests.release.xcconfig"; sourceTree = ""; }; 74 | D72988AF295E85CE6B80CB51 /* Pods_MaskingLayer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MaskingLayer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 777509BEC4649E9572A8F42A /* Pods_MaskingLayer_Example.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | BB6F894E2152E554008986BA /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | BB6F895C2152E56A008986BA /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | /* End PBXFrameworksBuildPhase section */ 101 | 102 | /* Begin PBXGroup section */ 103 | 3789A4954AFDA1D3DE338260 /* Pods */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 8C3EB22E58F46940F047EDD1 /* Pods-MaskingLayer_Example.debug.xcconfig */, 107 | 6B809DBE01A68FD431E007A6 /* Pods-MaskingLayer_Example.release.xcconfig */, 108 | C2788196BAAF3112A92117DF /* Pods-MaskingLayer_Tests.debug.xcconfig */, 109 | D3D5A22610BE6E7EA650D89D /* Pods-MaskingLayer_Tests.release.xcconfig */, 110 | ); 111 | name = Pods; 112 | sourceTree = ""; 113 | }; 114 | 4310DDC5ACCA6A8AAD948878 /* Frameworks */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | D72988AF295E85CE6B80CB51 /* Pods_MaskingLayer_Example.framework */, 118 | 5B98B6A3ED6858DDA461DAF1 /* Pods_MaskingLayer_Tests.framework */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | 607FACC71AFB9204008FA782 = { 124 | isa = PBXGroup; 125 | children = ( 126 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 127 | 607FACD21AFB9204008FA782 /* Example for MaskingLayer */, 128 | 607FACE81AFB9204008FA782 /* Tests */, 129 | BB6F89522152E554008986BA /* MaskingLayer_ExampleUITests */, 130 | BB6F89602152E56A008986BA /* MaskingLayer_ExampleTests */, 131 | 607FACD11AFB9204008FA782 /* Products */, 132 | 3789A4954AFDA1D3DE338260 /* Pods */, 133 | 4310DDC5ACCA6A8AAD948878 /* Frameworks */, 134 | ); 135 | sourceTree = ""; 136 | }; 137 | 607FACD11AFB9204008FA782 /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 607FACD01AFB9204008FA782 /* MaskingLayer_Example.app */, 141 | BB6F89512152E554008986BA /* MaskingLayer_ExampleUITests.xctest */, 142 | BB6F895F2152E56A008986BA /* MaskingLayer_ExampleTests.xctest */, 143 | ); 144 | name = Products; 145 | sourceTree = ""; 146 | }; 147 | 607FACD21AFB9204008FA782 /* Example for MaskingLayer */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 151 | BB4207F1237578F1005EE595 /* SceneDelegate.swift */, 152 | BBA589612380C6B2007012BE /* VC */, 153 | BBA589602380C69E007012BE /* UI */, 154 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 155 | BB4207F523758552005EE595 /* Camera.storyboard */, 156 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 157 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 158 | 607FACD31AFB9204008FA782 /* Supporting Files */, 159 | ); 160 | name = "Example for MaskingLayer"; 161 | path = MaskingLayer; 162 | sourceTree = ""; 163 | }; 164 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | 607FACD41AFB9204008FA782 /* Info.plist */, 168 | ); 169 | name = "Supporting Files"; 170 | sourceTree = ""; 171 | }; 172 | 607FACE81AFB9204008FA782 /* Tests */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 176 | 607FACE91AFB9204008FA782 /* Supporting Files */, 177 | ); 178 | path = Tests; 179 | sourceTree = ""; 180 | }; 181 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 607FACEA1AFB9204008FA782 /* Info.plist */, 185 | ); 186 | name = "Supporting Files"; 187 | sourceTree = ""; 188 | }; 189 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | BB6F8949215178E3008986BA /* MaskingLayer.podspec */, 193 | 9E24F33CE01566D0C7B22AE8 /* README.md */, 194 | 185EDAAFB0512F5B65133AA7 /* LICENSE */, 195 | ); 196 | name = "Podspec Metadata"; 197 | sourceTree = ""; 198 | }; 199 | BB6F89522152E554008986BA /* MaskingLayer_ExampleUITests */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | BB6F89532152E554008986BA /* MaskingLayer_ExampleUITests.swift */, 203 | BB6F89552152E554008986BA /* Info.plist */, 204 | ); 205 | path = MaskingLayer_ExampleUITests; 206 | sourceTree = ""; 207 | }; 208 | BB6F89602152E56A008986BA /* MaskingLayer_ExampleTests */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | BB6F89612152E56A008986BA /* MaskingLayer_ExampleTests.swift */, 212 | BB6F89632152E56A008986BA /* Info.plist */, 213 | ); 214 | path = MaskingLayer_ExampleTests; 215 | sourceTree = ""; 216 | }; 217 | BBA589602380C69E007012BE /* UI */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | BB4207F3237584E0005EE595 /* MaskButtonView.swift */, 221 | ); 222 | name = UI; 223 | sourceTree = ""; 224 | }; 225 | BBA589612380C6B2007012BE /* VC */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 229 | BBC88248237ECB33007C3F17 /* ViewController+Extension.swift */, 230 | BBBE209925FC837800BE7F18 /* TabBarController.swift */, 231 | BB4207F723758570005EE595 /* CameraViewController.swift */, 232 | ); 233 | name = VC; 234 | sourceTree = ""; 235 | }; 236 | /* End PBXGroup section */ 237 | 238 | /* Begin PBXNativeTarget section */ 239 | 607FACCF1AFB9204008FA782 /* MaskingLayer_Example */ = { 240 | isa = PBXNativeTarget; 241 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "MaskingLayer_Example" */; 242 | buildPhases = ( 243 | A4FA0BF84B0768175BF92274 /* [CP] Check Pods Manifest.lock */, 244 | 607FACCC1AFB9204008FA782 /* Sources */, 245 | 607FACCD1AFB9204008FA782 /* Frameworks */, 246 | 607FACCE1AFB9204008FA782 /* Resources */, 247 | B4645142FB283A777BC21BDE /* [CP] Embed Pods Frameworks */, 248 | ); 249 | buildRules = ( 250 | ); 251 | dependencies = ( 252 | ); 253 | name = MaskingLayer_Example; 254 | productName = MaskingLayer; 255 | productReference = 607FACD01AFB9204008FA782 /* MaskingLayer_Example.app */; 256 | productType = "com.apple.product-type.application"; 257 | }; 258 | BB6F89502152E554008986BA /* MaskingLayer_ExampleUITests */ = { 259 | isa = PBXNativeTarget; 260 | buildConfigurationList = BB6F895A2152E554008986BA /* Build configuration list for PBXNativeTarget "MaskingLayer_ExampleUITests" */; 261 | buildPhases = ( 262 | BB6F894D2152E554008986BA /* Sources */, 263 | BB6F894E2152E554008986BA /* Frameworks */, 264 | BB6F894F2152E554008986BA /* Resources */, 265 | ); 266 | buildRules = ( 267 | ); 268 | dependencies = ( 269 | BB6F89572152E554008986BA /* PBXTargetDependency */, 270 | ); 271 | name = MaskingLayer_ExampleUITests; 272 | productName = MaskingLayer_ExampleUITests; 273 | productReference = BB6F89512152E554008986BA /* MaskingLayer_ExampleUITests.xctest */; 274 | productType = "com.apple.product-type.bundle.ui-testing"; 275 | }; 276 | BB6F895E2152E56A008986BA /* MaskingLayer_ExampleTests */ = { 277 | isa = PBXNativeTarget; 278 | buildConfigurationList = BB6F89662152E56A008986BA /* Build configuration list for PBXNativeTarget "MaskingLayer_ExampleTests" */; 279 | buildPhases = ( 280 | BB6F895B2152E56A008986BA /* Sources */, 281 | BB6F895C2152E56A008986BA /* Frameworks */, 282 | BB6F895D2152E56A008986BA /* Resources */, 283 | ); 284 | buildRules = ( 285 | ); 286 | dependencies = ( 287 | BB6F89652152E56A008986BA /* PBXTargetDependency */, 288 | ); 289 | name = MaskingLayer_ExampleTests; 290 | productName = MaskingLayer_ExampleTests; 291 | productReference = BB6F895F2152E56A008986BA /* MaskingLayer_ExampleTests.xctest */; 292 | productType = "com.apple.product-type.bundle.unit-test"; 293 | }; 294 | /* End PBXNativeTarget section */ 295 | 296 | /* Begin PBXProject section */ 297 | 607FACC81AFB9204008FA782 /* Project object */ = { 298 | isa = PBXProject; 299 | attributes = { 300 | LastSwiftUpdateCheck = 1000; 301 | LastUpgradeCheck = 1220; 302 | ORGANIZATIONNAME = CocoaPods; 303 | TargetAttributes = { 304 | 607FACCF1AFB9204008FA782 = { 305 | CreatedOnToolsVersion = 6.3.1; 306 | DevelopmentTeam = B3ZKJZUE9E; 307 | LastSwiftMigration = 1020; 308 | ProvisioningStyle = Automatic; 309 | }; 310 | BB6F89502152E554008986BA = { 311 | CreatedOnToolsVersion = 10.0; 312 | DevelopmentTeam = B3ZKJZUE9E; 313 | LastSwiftMigration = 1020; 314 | ProvisioningStyle = Automatic; 315 | TestTargetID = 607FACCF1AFB9204008FA782; 316 | }; 317 | BB6F895E2152E56A008986BA = { 318 | CreatedOnToolsVersion = 10.0; 319 | DevelopmentTeam = B3ZKJZUE9E; 320 | LastSwiftMigration = 1020; 321 | ProvisioningStyle = Automatic; 322 | TestTargetID = 607FACCF1AFB9204008FA782; 323 | }; 324 | }; 325 | }; 326 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "MaskingLayer" */; 327 | compatibilityVersion = "Xcode 3.2"; 328 | developmentRegion = en; 329 | hasScannedForEncodings = 0; 330 | knownRegions = ( 331 | en, 332 | Base, 333 | ); 334 | mainGroup = 607FACC71AFB9204008FA782; 335 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 336 | projectDirPath = ""; 337 | projectRoot = ""; 338 | targets = ( 339 | 607FACCF1AFB9204008FA782 /* MaskingLayer_Example */, 340 | BB6F89502152E554008986BA /* MaskingLayer_ExampleUITests */, 341 | BB6F895E2152E56A008986BA /* MaskingLayer_ExampleTests */, 342 | ); 343 | }; 344 | /* End PBXProject section */ 345 | 346 | /* Begin PBXResourcesBuildPhase section */ 347 | 607FACCE1AFB9204008FA782 /* Resources */ = { 348 | isa = PBXResourcesBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 352 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 353 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 354 | BB6F894A215178E3008986BA /* MaskingLayer.podspec in Resources */, 355 | BB4207F623758552005EE595 /* Camera.storyboard in Resources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | BB6F894F2152E554008986BA /* Resources */ = { 360 | isa = PBXResourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | BB6F895D2152E56A008986BA /* Resources */ = { 367 | isa = PBXResourcesBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | /* End PBXResourcesBuildPhase section */ 374 | 375 | /* Begin PBXShellScriptBuildPhase section */ 376 | A4FA0BF84B0768175BF92274 /* [CP] Check Pods Manifest.lock */ = { 377 | isa = PBXShellScriptBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | inputPaths = ( 382 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 383 | "${PODS_ROOT}/Manifest.lock", 384 | ); 385 | name = "[CP] Check Pods Manifest.lock"; 386 | outputPaths = ( 387 | "$(DERIVED_FILE_DIR)/Pods-MaskingLayer_Example-checkManifestLockResult.txt", 388 | ); 389 | runOnlyForDeploymentPostprocessing = 0; 390 | shellPath = /bin/sh; 391 | 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"; 392 | showEnvVarsInLog = 0; 393 | }; 394 | B4645142FB283A777BC21BDE /* [CP] Embed Pods Frameworks */ = { 395 | isa = PBXShellScriptBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | ); 399 | inputPaths = ( 400 | "${PODS_ROOT}/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-frameworks.sh", 401 | "${BUILT_PRODUCTS_DIR}/MaskingLayer/MaskingLayer.framework", 402 | ); 403 | name = "[CP] Embed Pods Frameworks"; 404 | outputPaths = ( 405 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MaskingLayer.framework", 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | shellPath = /bin/sh; 409 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-frameworks.sh\"\n"; 410 | showEnvVarsInLog = 0; 411 | }; 412 | /* End PBXShellScriptBuildPhase section */ 413 | 414 | /* Begin PBXSourcesBuildPhase section */ 415 | 607FACCC1AFB9204008FA782 /* Sources */ = { 416 | isa = PBXSourcesBuildPhase; 417 | buildActionMask = 2147483647; 418 | files = ( 419 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 420 | BB4207F823758570005EE595 /* CameraViewController.swift in Sources */, 421 | BBBE209A25FC837800BE7F18 /* TabBarController.swift in Sources */, 422 | BBC88249237ECB33007C3F17 /* ViewController+Extension.swift in Sources */, 423 | BB4207F4237584E0005EE595 /* MaskButtonView.swift in Sources */, 424 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 425 | BB4207F2237578F1005EE595 /* SceneDelegate.swift in Sources */, 426 | ); 427 | runOnlyForDeploymentPostprocessing = 0; 428 | }; 429 | BB6F894D2152E554008986BA /* Sources */ = { 430 | isa = PBXSourcesBuildPhase; 431 | buildActionMask = 2147483647; 432 | files = ( 433 | BB6F89542152E554008986BA /* MaskingLayer_ExampleUITests.swift in Sources */, 434 | ); 435 | runOnlyForDeploymentPostprocessing = 0; 436 | }; 437 | BB6F895B2152E56A008986BA /* Sources */ = { 438 | isa = PBXSourcesBuildPhase; 439 | buildActionMask = 2147483647; 440 | files = ( 441 | BB6F89622152E56A008986BA /* MaskingLayer_ExampleTests.swift in Sources */, 442 | ); 443 | runOnlyForDeploymentPostprocessing = 0; 444 | }; 445 | /* End PBXSourcesBuildPhase section */ 446 | 447 | /* Begin PBXTargetDependency section */ 448 | BB6F89572152E554008986BA /* PBXTargetDependency */ = { 449 | isa = PBXTargetDependency; 450 | target = 607FACCF1AFB9204008FA782 /* MaskingLayer_Example */; 451 | targetProxy = BB6F89562152E554008986BA /* PBXContainerItemProxy */; 452 | }; 453 | BB6F89652152E56A008986BA /* PBXTargetDependency */ = { 454 | isa = PBXTargetDependency; 455 | target = 607FACCF1AFB9204008FA782 /* MaskingLayer_Example */; 456 | targetProxy = BB6F89642152E56A008986BA /* PBXContainerItemProxy */; 457 | }; 458 | /* End PBXTargetDependency section */ 459 | 460 | /* Begin PBXVariantGroup section */ 461 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 462 | isa = PBXVariantGroup; 463 | children = ( 464 | 607FACDA1AFB9204008FA782 /* Base */, 465 | ); 466 | name = Main.storyboard; 467 | sourceTree = ""; 468 | }; 469 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 470 | isa = PBXVariantGroup; 471 | children = ( 472 | 607FACDF1AFB9204008FA782 /* Base */, 473 | ); 474 | name = LaunchScreen.xib; 475 | sourceTree = ""; 476 | }; 477 | /* End PBXVariantGroup section */ 478 | 479 | /* Begin XCBuildConfiguration section */ 480 | 607FACED1AFB9204008FA782 /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ALWAYS_SEARCH_USER_PATHS = NO; 484 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 486 | CLANG_CXX_LIBRARY = "libc++"; 487 | CLANG_ENABLE_MODULES = YES; 488 | CLANG_ENABLE_OBJC_ARC = YES; 489 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 490 | CLANG_WARN_BOOL_CONVERSION = YES; 491 | CLANG_WARN_COMMA = YES; 492 | CLANG_WARN_CONSTANT_CONVERSION = YES; 493 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 494 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 495 | CLANG_WARN_EMPTY_BODY = YES; 496 | CLANG_WARN_ENUM_CONVERSION = YES; 497 | CLANG_WARN_INFINITE_RECURSION = YES; 498 | CLANG_WARN_INT_CONVERSION = YES; 499 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 500 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 501 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 502 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 503 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 504 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 505 | CLANG_WARN_STRICT_PROTOTYPES = YES; 506 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 507 | CLANG_WARN_UNREACHABLE_CODE = YES; 508 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 509 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 510 | COPY_PHASE_STRIP = NO; 511 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 512 | ENABLE_STRICT_OBJC_MSGSEND = YES; 513 | ENABLE_TESTABILITY = YES; 514 | GCC_C_LANGUAGE_STANDARD = gnu99; 515 | GCC_DYNAMIC_NO_PIC = NO; 516 | GCC_NO_COMMON_BLOCKS = YES; 517 | GCC_OPTIMIZATION_LEVEL = 0; 518 | GCC_PREPROCESSOR_DEFINITIONS = ( 519 | "DEBUG=1", 520 | "$(inherited)", 521 | ); 522 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 523 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 524 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 525 | GCC_WARN_UNDECLARED_SELECTOR = YES; 526 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 527 | GCC_WARN_UNUSED_FUNCTION = YES; 528 | GCC_WARN_UNUSED_VARIABLE = YES; 529 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 530 | MTL_ENABLE_DEBUG_INFO = YES; 531 | ONLY_ACTIVE_ARCH = YES; 532 | SDKROOT = iphoneos; 533 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 534 | }; 535 | name = Debug; 536 | }; 537 | 607FACEE1AFB9204008FA782 /* Release */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ALWAYS_SEARCH_USER_PATHS = NO; 541 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 542 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 543 | CLANG_CXX_LIBRARY = "libc++"; 544 | CLANG_ENABLE_MODULES = YES; 545 | CLANG_ENABLE_OBJC_ARC = YES; 546 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 547 | CLANG_WARN_BOOL_CONVERSION = YES; 548 | CLANG_WARN_COMMA = YES; 549 | CLANG_WARN_CONSTANT_CONVERSION = YES; 550 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 551 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 552 | CLANG_WARN_EMPTY_BODY = YES; 553 | CLANG_WARN_ENUM_CONVERSION = YES; 554 | CLANG_WARN_INFINITE_RECURSION = YES; 555 | CLANG_WARN_INT_CONVERSION = YES; 556 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 557 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 558 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 559 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 560 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 561 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 562 | CLANG_WARN_STRICT_PROTOTYPES = YES; 563 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 564 | CLANG_WARN_UNREACHABLE_CODE = YES; 565 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 566 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 567 | COPY_PHASE_STRIP = NO; 568 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 569 | ENABLE_NS_ASSERTIONS = NO; 570 | ENABLE_STRICT_OBJC_MSGSEND = YES; 571 | GCC_C_LANGUAGE_STANDARD = gnu99; 572 | GCC_NO_COMMON_BLOCKS = YES; 573 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 574 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 575 | GCC_WARN_UNDECLARED_SELECTOR = YES; 576 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 577 | GCC_WARN_UNUSED_FUNCTION = YES; 578 | GCC_WARN_UNUSED_VARIABLE = YES; 579 | IPHONEOS_DEPLOYMENT_TARGET = 14.1; 580 | MTL_ENABLE_DEBUG_INFO = NO; 581 | SDKROOT = iphoneos; 582 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 583 | VALIDATE_PRODUCT = YES; 584 | }; 585 | name = Release; 586 | }; 587 | 607FACF01AFB9204008FA782 /* Debug */ = { 588 | isa = XCBuildConfiguration; 589 | baseConfigurationReference = 8C3EB22E58F46940F047EDD1 /* Pods-MaskingLayer_Example.debug.xcconfig */; 590 | buildSettings = { 591 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 592 | CODE_SIGN_IDENTITY = "Apple Development"; 593 | CODE_SIGN_STYLE = Automatic; 594 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 595 | INFOPLIST_FILE = MaskingLayer/Info.plist; 596 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 597 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 598 | MODULE_NAME = ExampleApp; 599 | OTHER_LIBTOOLFLAGS = ""; 600 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 601 | PRODUCT_NAME = "$(TARGET_NAME)"; 602 | PROVISIONING_PROFILE_SPECIFIER = ""; 603 | SWIFT_VERSION = 5.0; 604 | }; 605 | name = Debug; 606 | }; 607 | 607FACF11AFB9204008FA782 /* Release */ = { 608 | isa = XCBuildConfiguration; 609 | baseConfigurationReference = 6B809DBE01A68FD431E007A6 /* Pods-MaskingLayer_Example.release.xcconfig */; 610 | buildSettings = { 611 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 612 | CODE_SIGN_IDENTITY = "Apple Development"; 613 | CODE_SIGN_STYLE = Automatic; 614 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 615 | INFOPLIST_FILE = MaskingLayer/Info.plist; 616 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 617 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 618 | MODULE_NAME = ExampleApp; 619 | OTHER_LIBTOOLFLAGS = ""; 620 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 621 | PRODUCT_NAME = "$(TARGET_NAME)"; 622 | PROVISIONING_PROFILE_SPECIFIER = ""; 623 | SWIFT_VERSION = 5.0; 624 | }; 625 | name = Release; 626 | }; 627 | BB6F89582152E554008986BA /* Debug */ = { 628 | isa = XCBuildConfiguration; 629 | buildSettings = { 630 | CLANG_ANALYZER_NONNULL = YES; 631 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 632 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 633 | CLANG_ENABLE_OBJC_WEAK = YES; 634 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 635 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 636 | CODE_SIGN_IDENTITY = "iPhone Developer"; 637 | CODE_SIGN_STYLE = Automatic; 638 | DEBUG_INFORMATION_FORMAT = dwarf; 639 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 640 | GCC_C_LANGUAGE_STANDARD = gnu11; 641 | INFOPLIST_FILE = MaskingLayer_ExampleUITests/Info.plist; 642 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 643 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 644 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 645 | MTL_FAST_MATH = YES; 646 | PRODUCT_BUNDLE_IDENTIFIER = "RsaDbnak.MaskingLayer-ExampleUITests"; 647 | PRODUCT_NAME = "$(TARGET_NAME)"; 648 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 649 | SWIFT_VERSION = 5.0; 650 | TARGETED_DEVICE_FAMILY = "1,2"; 651 | TEST_TARGET_NAME = MaskingLayer_Example; 652 | }; 653 | name = Debug; 654 | }; 655 | BB6F89592152E554008986BA /* Release */ = { 656 | isa = XCBuildConfiguration; 657 | buildSettings = { 658 | CLANG_ANALYZER_NONNULL = YES; 659 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 660 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 661 | CLANG_ENABLE_OBJC_WEAK = YES; 662 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 663 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 664 | CODE_SIGN_IDENTITY = "iPhone Developer"; 665 | CODE_SIGN_STYLE = Automatic; 666 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 667 | GCC_C_LANGUAGE_STANDARD = gnu11; 668 | INFOPLIST_FILE = MaskingLayer_ExampleUITests/Info.plist; 669 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 670 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 671 | MTL_FAST_MATH = YES; 672 | PRODUCT_BUNDLE_IDENTIFIER = "RsaDbnak.MaskingLayer-ExampleUITests"; 673 | PRODUCT_NAME = "$(TARGET_NAME)"; 674 | SWIFT_VERSION = 5.0; 675 | TARGETED_DEVICE_FAMILY = "1,2"; 676 | TEST_TARGET_NAME = MaskingLayer_Example; 677 | }; 678 | name = Release; 679 | }; 680 | BB6F89672152E56A008986BA /* Debug */ = { 681 | isa = XCBuildConfiguration; 682 | buildSettings = { 683 | BUNDLE_LOADER = "$(TEST_HOST)"; 684 | CLANG_ANALYZER_NONNULL = YES; 685 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 686 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 687 | CLANG_ENABLE_OBJC_WEAK = YES; 688 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 689 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 690 | CODE_SIGN_IDENTITY = "iPhone Developer"; 691 | CODE_SIGN_STYLE = Automatic; 692 | DEBUG_INFORMATION_FORMAT = dwarf; 693 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 694 | GCC_C_LANGUAGE_STANDARD = gnu11; 695 | INFOPLIST_FILE = MaskingLayer_ExampleTests/Info.plist; 696 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 697 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 698 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 699 | MTL_FAST_MATH = YES; 700 | PRODUCT_BUNDLE_IDENTIFIER = "RsaDbnak.MaskingLayer-ExampleTests"; 701 | PRODUCT_NAME = "$(TARGET_NAME)"; 702 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 703 | SWIFT_VERSION = 5.0; 704 | TARGETED_DEVICE_FAMILY = "1,2"; 705 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MaskingLayer_Example.app/MaskingLayer_Example"; 706 | }; 707 | name = Debug; 708 | }; 709 | BB6F89682152E56A008986BA /* Release */ = { 710 | isa = XCBuildConfiguration; 711 | buildSettings = { 712 | BUNDLE_LOADER = "$(TEST_HOST)"; 713 | CLANG_ANALYZER_NONNULL = YES; 714 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 715 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 716 | CLANG_ENABLE_OBJC_WEAK = YES; 717 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 718 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 719 | CODE_SIGN_IDENTITY = "iPhone Developer"; 720 | CODE_SIGN_STYLE = Automatic; 721 | DEVELOPMENT_TEAM = B3ZKJZUE9E; 722 | GCC_C_LANGUAGE_STANDARD = gnu11; 723 | INFOPLIST_FILE = MaskingLayer_ExampleTests/Info.plist; 724 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 725 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 726 | MTL_FAST_MATH = YES; 727 | PRODUCT_BUNDLE_IDENTIFIER = "RsaDbnak.MaskingLayer-ExampleTests"; 728 | PRODUCT_NAME = "$(TARGET_NAME)"; 729 | SWIFT_VERSION = 5.0; 730 | TARGETED_DEVICE_FAMILY = "1,2"; 731 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MaskingLayer_Example.app/MaskingLayer_Example"; 732 | }; 733 | name = Release; 734 | }; 735 | /* End XCBuildConfiguration section */ 736 | 737 | /* Begin XCConfigurationList section */ 738 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "MaskingLayer" */ = { 739 | isa = XCConfigurationList; 740 | buildConfigurations = ( 741 | 607FACED1AFB9204008FA782 /* Debug */, 742 | 607FACEE1AFB9204008FA782 /* Release */, 743 | ); 744 | defaultConfigurationIsVisible = 0; 745 | defaultConfigurationName = Release; 746 | }; 747 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "MaskingLayer_Example" */ = { 748 | isa = XCConfigurationList; 749 | buildConfigurations = ( 750 | 607FACF01AFB9204008FA782 /* Debug */, 751 | 607FACF11AFB9204008FA782 /* Release */, 752 | ); 753 | defaultConfigurationIsVisible = 0; 754 | defaultConfigurationName = Release; 755 | }; 756 | BB6F895A2152E554008986BA /* Build configuration list for PBXNativeTarget "MaskingLayer_ExampleUITests" */ = { 757 | isa = XCConfigurationList; 758 | buildConfigurations = ( 759 | BB6F89582152E554008986BA /* Debug */, 760 | BB6F89592152E554008986BA /* Release */, 761 | ); 762 | defaultConfigurationIsVisible = 0; 763 | defaultConfigurationName = Release; 764 | }; 765 | BB6F89662152E56A008986BA /* Build configuration list for PBXNativeTarget "MaskingLayer_ExampleTests" */ = { 766 | isa = XCConfigurationList; 767 | buildConfigurations = ( 768 | BB6F89672152E56A008986BA /* Debug */, 769 | BB6F89682152E56A008986BA /* Release */, 770 | ); 771 | defaultConfigurationIsVisible = 0; 772 | defaultConfigurationName = Release; 773 | }; 774 | /* End XCConfigurationList section */ 775 | }; 776 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 777 | } 778 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcodeproj/xcshareddata/xcschemes/MaskingLayer-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 56 | 62 | 63 | 64 | 66 | 72 | 73 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 96 | 98 | 104 | 105 | 106 | 107 | 113 | 115 | 121 | 122 | 123 | 124 | 126 | 127 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/MaskingLayer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/MaskingLayer/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // MaskingLayer 4 | // 5 | // Created by daisukenagata on 08/04/2018. 6 | // Copyright (c) 2018 daisukenagata. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | window?.makeKeyAndVisible() 20 | window?.rootViewController = TabBarController() 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(_ application: UIApplication) { 25 | // 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. 26 | // 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. 27 | } 28 | 29 | func applicationDidEnterBackground(_ application: UIApplication) { 30 | // 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. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(_ application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | func applicationDidBecomeActive(_ application: UIApplication) { 39 | // 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. 40 | } 41 | 42 | func applicationWillTerminate(_ application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /Example/MaskingLayer/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/MaskingLayer/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Example/MaskingLayer/Camera.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/MaskingLayer/CameraViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CameraViewController.swift 3 | // MaskingLayer_Example 4 | // 5 | // Created by 永田大祐 on 2019/11/08. 6 | // Copyright © 2019 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MaskingLayer 11 | 12 | class CameraViewController: UIViewController { 13 | 14 | static func identifier() -> String { return String(describing: ViewController.self) } 15 | 16 | static func viewController() -> ViewController { 17 | 18 | let sb = UIStoryboard(name: "Camera", bundle: nil) 19 | let vc = sb.instantiateInitialViewController() as! ViewController 20 | return vc 21 | } 22 | 23 | private var mVM : MaskingLayerViewModel? = nil 24 | private var mBObject : MaskButtonView? = nil 25 | private var d: UIView? 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | d = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)) 31 | } 32 | override func viewDidAppear(_ animated: Bool) { 33 | super.viewDidAppear(true) 34 | 35 | mBObject?.cameraMatte.isHidden = false 36 | mBObject?.cameraRecord.isHidden = false 37 | 38 | mVM = MaskingLayerViewModel() 39 | mBObject = MaskButtonView(frame: self.tabBarController?.tabBar.frame ?? CGRect()) 40 | 41 | self.tabBarController?.tabBar.addSubview(mBObject?.cameraMatte ?? UIButton()) 42 | self.tabBarController?.tabBar.addSubview(mBObject?.cameraRecord ?? UIButton()) 43 | 44 | mBObject?.cameraMatte.addTarget(self, action: #selector(btAction), for: .touchUpInside) 45 | mBObject?.cameraRecord.addTarget(self, action: #selector(cameraAction), for: .touchUpInside) 46 | 47 | view.addSubview(d ?? UIView()) 48 | mVM?.cmareraPreView(d ?? UIView()) 49 | } 50 | 51 | override func viewWillDisappear(_ animated: Bool) { 52 | super.viewWillDisappear(true) 53 | 54 | mBObject?.cameraMatte.isHidden = true 55 | mBObject?.cameraRecord.isHidden = true 56 | d?.removeFromSuperview() 57 | mVM?.cameraReset(view: d ?? UIView()) 58 | mVM = nil 59 | } 60 | 61 | // DyeHair Set 62 | @objc func btAction() { mVM?.btAction(view: d ?? UIView()) } 63 | 64 | // Save photosAlbum 65 | @objc func cameraAction() { mVM?.cameraAction() } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Mask@2x-2.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Mask@3x-2.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Mask@2x-3.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Mask@3x-3.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Mask@2x-1.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Mask@3x-1.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Mask@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Mask@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "1024x1024", 53 | "idiom" : "ios-marketing", 54 | "filename" : "Mask.png", 55 | "scale" : "1x" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-1.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-2.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x-3.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@2x.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-1.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-2.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x-3.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/AppIcon.appiconset/Mask@3x.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/IMG_4011.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "IMG_4011.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/IMG_4011.imageset/IMG_4011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/IMG_4011.imageset/IMG_4011.jpg -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Mask.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Mask.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Mask.imageset/Mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/Mask.imageset/Mask.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Reset.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Rest.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Rest@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Rest@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest@2x.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/Example/MaskingLayer/Images.xcassets/Reset.imageset/Rest@3x.png -------------------------------------------------------------------------------- /Example/MaskingLayer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSCameraUsageDescription 26 | PLEASE USE CAMERA 27 | NSMicrophoneUsageDescription 28 | PLEASE USE MiICROFONE 29 | NSPhotoLibraryAddUsageDescription 30 | PLEASE USE PHOTO LIBRARY 31 | NSPhotoLibraryUsageDescription 32 | 必要です。 33 | UILaunchStoryboardName 34 | LaunchScreen 35 | UIMainStoryboardFile 36 | Main 37 | UIRequiredDeviceCapabilities 38 | 39 | armv7 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/MaskingLayer/MaskButtonView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskButtonObject.swift 3 | // MaskMatte 4 | // 5 | // Created by 永田大祐 on 2019/11/06. 6 | // Copyright © 2019 永田大祐. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MaskButtonView: UIView { 12 | 13 | let cameraMatte = UIButton() 14 | let cameraRecord = UIButton() 15 | 16 | private var originY : CGFloat = 25 17 | private var btWidthHeight : CGFloat = 50 18 | 19 | override init(frame: CGRect) { 20 | super.init(frame: frame) 21 | 22 | btDesgin(frame) 23 | } 24 | 25 | required init?(coder: NSCoder) { 26 | fatalError("init(coder:) has not been implemented") 27 | } 28 | 29 | func btDesgin(_ tab: CGRect) { 30 | 31 | cameraMatte.frame = CGRect(x: (tab.width) / 2 - (originY+btWidthHeight), y: (tab.height) / 2 - originY, width: btWidthHeight, height: 50) 32 | cameraMatte.backgroundColor = .red 33 | cameraMatte.layer.cornerRadius = cameraMatte.frame.height/2 34 | 35 | cameraRecord.frame = CGRect(x: (tab.width) / 2 + originY, y: (tab.height) / 2 - originY, width: btWidthHeight, height: btWidthHeight) 36 | cameraRecord.backgroundColor = .blue 37 | cameraRecord.layer.cornerRadius = cameraRecord.frame.height/2 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/MaskingLayer/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // MaskingLayer_Example 4 | // 5 | // Created by 永田大祐 on 2019/11/08. 6 | // Copyright © 2019 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | guard let s = (scene as? UIWindowScene) else { return } 21 | 22 | s.windows.map { m in 23 | m.makeKeyAndVisible() 24 | m.rootViewController = TabBarController() 25 | }.first 26 | } 27 | 28 | func sceneDidDisconnect(_ scene: UIScene) { 29 | // Called as the scene is being released by the system. 30 | // This occurs shortly after the scene enters the background, or when its session is discarded. 31 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 32 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 33 | } 34 | 35 | func sceneDidBecomeActive(_ scene: UIScene) { 36 | // Called when the scene has moved from an inactive state to an active state. 37 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 38 | } 39 | 40 | func sceneWillResignActive(_ scene: UIScene) { 41 | // Called when the scene will move from an active state to an inactive state. 42 | // This may occur due to temporary interruptions (ex. an incoming phone call). 43 | } 44 | 45 | func sceneWillEnterForeground(_ scene: UIScene) { 46 | // Called as the scene transitions from the background to the foreground. 47 | // Use this method to undo the changes made on entering the background. 48 | } 49 | 50 | func sceneDidEnterBackground(_ scene: UIScene) { 51 | // Called as the scene transitions from the foreground to the background. 52 | // Use this method to save data, release shared resources, and store enough scene-specific state information 53 | // to restore the scene back to its current state. 54 | } 55 | 56 | 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/MaskingLayer/TabBarController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabBarController.swift 3 | // MaskMatte 4 | // 5 | // Created by 永田大祐 on 2019/11/05. 6 | // Copyright © 2019 永田大祐. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class TabBarController: UITabBarController { 12 | 13 | private var statusBarStyle : UIStatusBarStyle = .default 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | self.viewControllers = TabBarController.viewControllers() 19 | 20 | UITabBar.appearance().tintColor = UIColor.black 21 | let item = UITabBarItem.appearance() 22 | item.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: 0) 23 | item.setTitleTextAttributes([kCTFontAttributeName as NSAttributedString.Key: UIFont.systemFont(ofSize: 0)], for: .normal) 24 | _ = self.tabBar.sizeThatFits(CGSize()) 25 | } 26 | 27 | 28 | static func viewControllers() -> [UIViewController] { 29 | 30 | let vi = ViewController.viewController() 31 | vi.view.backgroundColor = UIColor.white 32 | (UINavigationBar.appearance() as UINavigationBar).setBackgroundImage(UIImage(), for: .default) 33 | let opc = UINavigationController(rootViewController: vi) 34 | return [opc] 35 | } 36 | } 37 | 38 | extension UITabBar { 39 | override public func sizeThatFits(_ size: CGSize) -> CGSize { 40 | var sized = super.sizeThatFits(size) 41 | sized.height = 100 42 | return sized 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Example/MaskingLayer/ViewController+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController+Extension.swift 3 | // MaskingLayer_Example 4 | // 5 | // Created by 永田大祐 on 2019/11/15. 6 | // Copyright © 2019 CocoaPods. All rights reserved. 7 | // 8 | import UIKit 9 | import MaskingLayer 10 | 11 | extension ViewController { 12 | 13 | func alertSave(modelView: MaskingLayerModelView) { 14 | let alertController = UIAlertController(title: NSLocalizedString("Camera Option", comment: ""), message: "", preferredStyle: .alert) 15 | let cameraRoll = UIAlertAction(title: NSLocalizedString("CameraRoll ", comment: ""), style: .default) { 16 | action in 17 | alertController.dismiss(animated: true, completion: nil) 18 | modelView.mLViewModel?.maskLayer?.maskImagePicker.photoSegue(vc: self, mo: modelView, bool: false) 19 | } 20 | let trimUI = UIAlertAction(title: NSLocalizedString("TrimUI", comment: ""), style: .default) { 21 | action in 22 | modelView.mLViewModel?.maskLayer?.strokeColor = .red 23 | modelView.mLViewModel?.maskLayer?.strokeALpha = 0.5 24 | modelView.mLViewModel?.maskLayer?.trimLayer(modelView: modelView) 25 | alertController.dismiss(animated: true, completion: nil) 26 | } 27 | 28 | let trimUIWindow = UIAlertAction(title: NSLocalizedString("TrimUIWindow", comment: ""), style: .default) { 29 | action in 30 | modelView.mv?.pinchAndTapGesture() 31 | modelView.desginInit() 32 | alertController.dismiss(animated: true, completion: nil) 33 | } 34 | 35 | let trimMask = UIAlertAction(title: NSLocalizedString("TrimMask", comment: ""), style: .default) { 36 | action in 37 | guard let imageView = modelView.maskModel?.imageView else { return } 38 | modelView.maskModel?.windowFrameView == nil ? 39 | modelView.mLViewModel?.imageMask(imageView: imageView) : 40 | modelView.mLViewModel?.lockImageMask(imageView: imageView, 41 | windowFrameView: modelView.maskModel?.windowFrameView ?? UIImageView()) 42 | alertController.dismiss(animated: true, completion: nil) 43 | } 44 | let dyeHair = UIAlertAction(title: NSLocalizedString("DyeHair", comment: ""), style: .default) { 45 | action in 46 | alertController.dismiss(animated: true, completion: { modelView.mLViewModel?.maskLayer?.cameraSelect(mo: modelView.mLViewModel) }) 47 | } 48 | let reset = UIAlertAction(title: NSLocalizedString("ReSet ", comment: ""), style: .default) { 49 | action in 50 | modelView.mLViewModel?.maskLayer?.maskLayer() 51 | modelView.mLViewModel?.maskLayer?.mutablePathSet(modelView: modelView) 52 | alertController.dismiss(animated: true, completion: nil) 53 | } 54 | modelView.maskModel?.imageView.setNeedsLayout() 55 | alertController.addAction(cameraRoll) 56 | alertController.addAction(trimUI) 57 | alertController.addAction(trimUIWindow) 58 | alertController.addAction(trimMask) 59 | alertController.addAction(dyeHair) 60 | alertController.addAction(reset) 61 | self.present(alertController, animated: true, completion: nil) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Example/MaskingLayer/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // MaskingLayer 4 | // 5 | // Created by daisukenagata on 08/04/2018. 6 | // Copyright (c) 2018 daisukenagata. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MaskingLayer 11 | 12 | class ViewController: UIViewController { 13 | 14 | static func identifier() -> String { return String(describing: ViewController.self) } 15 | 16 | static func viewController() -> ViewController { 17 | 18 | let sb = UIStoryboard(name: "Main", bundle: nil) 19 | let vc = sb.instantiateInitialViewController() as! ViewController 20 | return vc 21 | } 22 | 23 | 24 | private var maskingModelView: MaskingLayerModelView? 25 | private var mo: MaskingLayerViewModel? 26 | private var mv: MaskGestureViewModel? 27 | private var masklayer: MaskLayer? 28 | 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | 32 | maskingModelView = MaskingLayerModelView(trimJudge: true, 33 | minSegment: 15, 34 | originPosition: 300, 35 | windowSizeWidth: 100, 36 | windowSizeHeight: 50, 37 | windowAlpha: 0.5, 38 | windowColor: .red, 39 | image: UIImage(named: "IMG_4011")!, 40 | imageView: UIImageView(frame: view.frame), 41 | maskGestureView: view) 42 | maskingModelView?.mv?.cameraObserve { 43 | let storyboard: UIStoryboard = UIStoryboard(name: "Camera", bundle: nil) 44 | let next: UIViewController = storyboard.instantiateInitialViewController() as! CameraViewController 45 | self.navigationController?.pushViewController(next, animated: true) 46 | } 47 | 48 | self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Alert", style: .done, target: self, action: #selector(callAlert)) 49 | } 50 | 51 | @objc func callAlert() { 52 | guard let modelView = maskingModelView else { return } 53 | self.alertSave(modelView: modelView) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'MaskingLayer_Example' do 4 | pod 'MaskingLayer' 5 | end 6 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MaskingLayer (1.2.1) 3 | 4 | DEPENDENCIES: 5 | - MaskingLayer 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - MaskingLayer 10 | 11 | SPEC CHECKSUMS: 12 | MaskingLayer: df7f4fbdcdc75d10fc5711dec9234933e9411bc4 13 | 14 | PODFILE CHECKSUM: 2172508f29a76d37de9409b2838cf6ae9cdd0d66 15 | 16 | COCOAPODS: 1.10.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MaskingLayer (1.2.1) 3 | 4 | DEPENDENCIES: 5 | - MaskingLayer 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - MaskingLayer 10 | 11 | SPEC CHECKSUMS: 12 | MaskingLayer: df7f4fbdcdc75d10fc5711dec9234933e9411bc4 13 | 14 | PODFILE CHECKSUM: 2172508f29a76d37de9409b2838cf6ae9cdd0d66 15 | 16 | COCOAPODS: 1.10.0 17 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 daisukenagata 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/DefalutExtension/MaskExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskExtension.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/08/24. 6 | // 7 | 8 | import Foundation 9 | 10 | 11 | extension UIImage { 12 | func animatedGIF(data: Data,duration: Double) -> UIImage? { 13 | guard let source = CGImageSourceCreateWithData(data as CFData, nil) else { return nil } 14 | var speed = 0.0; speed = duration 15 | let count = CGImageSourceGetCount(source) 16 | var images: [UIImage] = [] 17 | 18 | for i in 0.. UIImage! { 38 | UIGraphicsBeginImageContextWithOptions(CGSize(width: width, height: height),true,0.0) 39 | 40 | self.draw(in: CGRect(x: 0, y: 0, width: width, height: height)) 41 | 42 | let newImage = UIGraphicsGetImageFromCurrentImageContext() 43 | UIGraphicsEndImageContext() 44 | 45 | return newImage 46 | } 47 | 48 | func mask(image: UIImage?) -> UIImage { 49 | if let maskRef = image?.cgImage, 50 | let ref = cgImage, 51 | let mask = CGImage(maskWidth: maskRef.width, 52 | height: maskRef.height, 53 | bitsPerComponent: maskRef.bitsPerComponent, 54 | bitsPerPixel: maskRef.bitsPerPixel, 55 | bytesPerRow: maskRef.bytesPerRow, 56 | provider: maskRef.dataProvider!, 57 | decode: nil, 58 | shouldInterpolate: false), 59 | let output = ref.masking(mask) { 60 | return UIImage(cgImage: output) 61 | } 62 | return self 63 | } 64 | 65 | func updateImageOrientionUpSide() -> UIImage { 66 | if self.imageOrientation == .up { 67 | return self 68 | } 69 | UIGraphicsBeginImageContextWithOptions(self.size, false, self.scale) 70 | self.draw(in: CGRect(x: 0, y: 0, width: self.size.width, height: self.size.height)) 71 | if let normalizedImage:UIImage = UIGraphicsGetImageFromCurrentImageContext() { 72 | UIGraphicsEndImageContext() 73 | return normalizedImage 74 | } 75 | UIGraphicsEndImageContext() 76 | return UIImage() 77 | } 78 | 79 | func horizontalInversion() -> UIImage { 80 | UIGraphicsBeginImageContextWithOptions(size, false, CGFloat(1.0)) 81 | let imageRef = self.cgImage 82 | let context = UIGraphicsGetCurrentContext() 83 | context?.translateBy(x: size.width, y: size.height) 84 | context?.scaleBy(x: -1.0, y: -1.0) 85 | context?.draw(imageRef!, in: CGRect(x: 0, y: 0, width: size.width, height: size.height)) 86 | let flipHorizontalImage = UIGraphicsGetImageFromCurrentImageContext() 87 | UIGraphicsEndImageContext() 88 | return flipHorizontalImage! 89 | } 90 | } 91 | 92 | extension CGImage { 93 | func resize(_ image: CGImage) -> CGImage? { 94 | let maxWidth: CGFloat = CGFloat(UIScreen.main.bounds.width) 95 | let maxHeight: CGFloat = CGFloat(UIScreen.main.bounds.height) 96 | 97 | guard let colorSpace = image.colorSpace else { return nil } 98 | guard let context = CGContext(data: nil, width: Int(maxWidth), height: Int(maxHeight), bitsPerComponent: image.bitsPerComponent, bytesPerRow: image.bytesPerRow, space: colorSpace, bitmapInfo: image.alphaInfo.rawValue) else { return nil } 99 | 100 | context.interpolationQuality = .high 101 | context.draw(image, in: CGRect(x: 0, y: 0, width: Int(maxWidth), height: Int(maxHeight))) 102 | 103 | return context.makeImage() 104 | } 105 | } 106 | 107 | extension CGPoint { 108 | func middle(_ from:CGPoint) -> CGPoint { 109 | return CGPoint(x: (self.x + from.x)/2, y: (self.y + from.y)/2) 110 | } 111 | 112 | func delta(_ from:CGPoint) -> CGPoint { 113 | return CGPoint(x: self.x - from.x, y: self.y - from.y) 114 | } 115 | 116 | func dotProduct(_ with:CGPoint) -> CGFloat { 117 | return self.x * with.x + self.y * with.y 118 | } 119 | } 120 | 121 | 122 | extension MaskPathElement { 123 | func addAsPolygon(to path:CGMutablePath) -> CGMutablePath { 124 | return add(to: path) 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/MaskProtocol/MaskProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskProtocol.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/08/24. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol CViewProtocol { 11 | func maskPathBegan(position: CGPoint) 12 | func maskAddLine(position: CGPoint) 13 | func maskPathEnded(position: CGPoint, model: MaskingLayerModel?) 14 | } 15 | 16 | protocol MaskPathElement { 17 | func add(to path:CGMutablePath) -> CGMutablePath 18 | func addAsPolygon(to path:CGMutablePath) -> CGMutablePath 19 | } 20 | 21 | protocol Observer { 22 | func observe(for observable: MaskObservable, with: @escaping (O) -> Void) 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Model/MaskCollectionDelegateModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskCollectionDelegateModel.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2021/03/13. 6 | // 7 | 8 | import Foundation 9 | 10 | struct MaskCollectionDelegateModel { 11 | var indexCount = 0 12 | var sectiom = 0 13 | var rotate = 0 14 | var bind: Void? 15 | var image: UIImage? 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Model/MaskFilterBuiltinsMatte.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskFilterBuiltinsMatte.swift 3 | // MaskMatte 4 | // 5 | // Created by 永田大祐 on 2019/11/05. 6 | // Copyright © 2019 永田大祐. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | import CoreImage.CIFilterBuiltins 12 | 13 | final class MaskFilterBuiltinsMatte: NSObject { 14 | 15 | lazy var context = CIContext() 16 | 17 | private var xibView : SliiderObjectsView? = nil 18 | private var photos : AVCapturePhoto? 19 | private var semanticSegmentationType: AVSemanticSegmentationMatte.MatteType? 20 | 21 | private var call = { (_ image: UIImage?) -> Void in } 22 | 23 | private var videoDeviceInput : AVCaptureDeviceInput! 24 | private var captureDeviceInput : AVCaptureDeviceInput! 25 | private var based : CIImage? 26 | private var currentDevice : AVCaptureDevice? 27 | private var captureSession : AVCaptureSession? 28 | private var photoOutput : AVCapturePhotoOutput? 29 | private var settings : AVCapturePhotoSettings? 30 | private var cameraPreviewLayer : AVCaptureVideoPreviewLayer? 31 | private var photoQualityPrioritizationMode: AVCapturePhotoOutput.QualityPrioritization = .balanced 32 | private let videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera, .builtInDualCamera, .builtInTrueDepthCamera], 33 | mediaType: .video, position: .unspecified) 34 | 35 | func setMaskFilter(view: UIView) { 36 | captureSession = AVCaptureSession() 37 | captureSession?.sessionPreset = AVCaptureSession.Preset.photo 38 | setupInputOutput() 39 | setupPreviewLayer(view) 40 | captureSession?.startRunning() 41 | } 42 | 43 | func returnAnimation(height: CGFloat) { 44 | xibView?.returnAnimation() 45 | } 46 | 47 | func btAction(view: UIView, tabHeight: CGFloat) { 48 | if self.xibView?.sliderImageView.image == nil { 49 | cameraAction { image in 50 | self.xibView = SliiderObjectsView(frameHight: 100) 51 | self.xibView?.frame = view.frame 52 | self.xibView?.sliderImageView.contentMode = .scaleAspectFit 53 | self.xibView?.sliderImageView.image = image 54 | view.addSubview(self.xibView ?? SliiderObjectsView(frameHight: tabHeight)) 55 | } 56 | } else { 57 | maskFilterBuiltinsChanges(value : xibView?.sliderInputRVector.value, 58 | value2 : xibView?.sliderInputGVector.value, 59 | value3 : xibView?.sliderInputBVector.value, 60 | value4 : xibView?.sliderInputAVector.value, 61 | photo : photos, 62 | ssmType : semanticSegmentationType, 63 | imageView: xibView?.sliderImageView ?? UIImageView()) 64 | } 65 | } 66 | 67 | func cameraAction(_ callBack: @escaping (_ image: UIImage?) -> Void){ 68 | settings = AVCapturePhotoSettings() 69 | settings? = AVCapturePhotoSettings(format: [AVVideoCodecKey: AVVideoCodecType.hevc]) 70 | settings?.flashMode = .auto 71 | settings?.isHighResolutionPhotoEnabled = true 72 | settings?.previewPhotoFormat = [kCVPixelBufferPixelFormatTypeKey as String: settings?.__availablePreviewPhotoPixelFormatTypes.first ?? NSNumber()] 73 | settings?.isDepthDataDeliveryEnabled = true 74 | settings?.isPortraitEffectsMatteDeliveryEnabled = true 75 | if self.photoOutput?.enabledSemanticSegmentationMatteTypes.isEmpty == false { 76 | settings?.enabledSemanticSegmentationMatteTypes = self.photoOutput?.enabledSemanticSegmentationMatteTypes ?? [AVSemanticSegmentationMatte.MatteType]() 77 | } 78 | 79 | settings?.photoQualityPrioritization = self.photoQualityPrioritizationMode 80 | photoOutput?.capturePhoto(with: settings ?? AVCapturePhotoSettings(), delegate: self) 81 | 82 | call = callBack 83 | } 84 | 85 | // Free memory 86 | func cameraReset() { 87 | based = nil 88 | photos = nil 89 | settings = nil 90 | photoOutput = nil 91 | currentDevice = nil 92 | 93 | captureSession?.stopRunning() 94 | 95 | for output in (self.captureSession?.outputs)! { self.captureSession?.removeOutput(output as AVCaptureOutput) } 96 | for input in (self.captureSession?.inputs)! { self.captureSession?.removeInput(input as AVCaptureInput) } 97 | 98 | context.clearCaches() 99 | xibView?.removeFromSuperview() 100 | xibView?.sliderView.removeFromSuperview() 101 | cameraPreviewLayer?.removeFromSuperlayer() 102 | xibView?.sliderImageView.removeFromSuperview() 103 | } 104 | 105 | func uIImageWriteToSavedPhotosAlbum() { UIImageWriteToSavedPhotosAlbum(xibView?.sliderImageView.image ?? UIImage(), nil,nil,nil) } 106 | 107 | private func matteSetting(value : Float? = nil, 108 | value2 : Float? = nil, 109 | value3 : Float? = nil, 110 | value4 : Float? = nil, 111 | base : CIImage, 112 | ssm : AVSemanticSegmentationMatte) -> Data { 113 | let maxcomp1 = CIFilter.maximumComponent() 114 | maxcomp1.inputImage = base 115 | var makeup1 = maxcomp1.outputImage 116 | let gamma1 = CIFilter.gammaAdjust() 117 | gamma1.inputImage = base 118 | gamma1.power = value ?? 0.65 119 | makeup1 = gamma1.outputImage 120 | 121 | let maxcomp = CIFilter.maximumComponent() 122 | maxcomp.inputImage = makeup1 123 | var makeup = maxcomp.outputImage 124 | let gamma = CIFilter.colorMatrix() 125 | gamma.inputImage = makeup1 126 | gamma.setValue(CIVector(x: 0, y: CGFloat(value2 ?? 1), z: 0, w: 0), forKey: "inputRVector") 127 | gamma.setValue(CIVector(x: 0, y: CGFloat(value3 ?? 1), z: 0, w: 0), forKey: "inputGVector") 128 | gamma.setValue(CIVector(x: 0, y: CGFloat(value4 ?? 1), z: 0, w: 0), forKey: "inputBVector") 129 | gamma.setValue(CIVector(x: 0, y: 0, z: 0, w: 1), forKey: "inputAVector") 130 | makeup = gamma.outputImage 131 | 132 | var matte = CIImage(cvImageBuffer: ssm.mattingImage, options: [.auxiliarySemanticSegmentationHairMatte : true]) 133 | 134 | let scale = CGAffineTransform(scaleX: base.extent.size.width / matte.extent.size.width, 135 | y: base.extent.size.height / matte.extent.size.height) 136 | matte = matte.transformed( by: scale ) 137 | 138 | let blend = CIFilter.blendWithMask() 139 | blend.backgroundImage = base 140 | blend.inputImage = makeup 141 | blend.maskImage = matte 142 | let result = blend.outputImage 143 | guard let outputImage = result else { return Data()} 144 | guard let perceptualColorSpace = CGColorSpace(name: CGColorSpace.sRGB) else { return Data()} 145 | 146 | let ciImage = CIImage( cvImageBuffer: ssm.mattingImage, 147 | options: [.auxiliarySemanticSegmentationHairMatte: true, 148 | .colorSpace: perceptualColorSpace]) 149 | 150 | guard let linearColorSpace = CGColorSpace(name: CGColorSpace.linearSRGB), 151 | let imagedata = context.pngRepresentation(of: outputImage, 152 | format: .RGBA8, 153 | colorSpace: linearColorSpace, 154 | options: [.semanticSegmentationHairMatteImage : ciImage,]) else { return Data()} 155 | 156 | return imagedata 157 | } 158 | 159 | private func maskFilterBuiltins(_ bind : @escaping (_ image: UIImage?) -> Void, 160 | value : Float? = nil, 161 | value2 : Float? = nil, 162 | value3 : Float? = nil, 163 | value4 : Float? = nil, 164 | photo : AVCapturePhoto, 165 | ssmType: AVSemanticSegmentationMatte.MatteType, 166 | image : UIImage) { 167 | 168 | guard var segmentationMatte = photo.semanticSegmentationMatte(for: ssmType), 169 | let base = CIImage(image: image.updateImageOrientionUpSide()) else { return } 170 | if let orientation = photo.metadata[String(kCGImagePropertyOrientation)] as? UInt32, 171 | let exifOrientation = CGImagePropertyOrientation(rawValue: orientation) { 172 | 173 | segmentationMatte = segmentationMatte.applyingExifOrientation(exifOrientation) 174 | } 175 | based = base 176 | photos = photo 177 | let imagedata = matteSetting(base: base, ssm: segmentationMatte) 178 | bind(UIImage(data: imagedata)?.horizontalInversion()) 179 | } 180 | 181 | private func maskFilterBuiltinsChanges(value : Float? = nil, 182 | value2 : Float? = nil, 183 | value3 : Float? = nil, 184 | value4 : Float? = nil, 185 | photo : AVCapturePhoto?, 186 | ssmType : AVSemanticSegmentationMatte.MatteType?, 187 | imageView: UIImageView) { 188 | 189 | guard let ssmType = ssmType else { return } 190 | guard var segmentationMatte = photo?.semanticSegmentationMatte(for: ssmType) else { return } 191 | if let orientation = photo?.metadata[String(kCGImagePropertyOrientation)] as? UInt32, 192 | let exifOrientation = CGImagePropertyOrientation(rawValue: orientation) { 193 | 194 | segmentationMatte = segmentationMatte.applyingExifOrientation(exifOrientation) 195 | } 196 | let base = based 197 | let imagedata = matteSetting(value: value, value2: value2, value3: value3, value4: value4, base: base ?? CIImage(), ssm: segmentationMatte) 198 | imageView.image = UIImage(data: imagedata)?.horizontalInversion() 199 | } 200 | 201 | private func setupPreviewLayer(_ view: UIView) { 202 | self.cameraPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession ?? AVCaptureSession()) 203 | self.cameraPreviewLayer?.videoGravity = AVLayerVideoGravity.resizeAspect 204 | self.cameraPreviewLayer?.connection?.videoOrientation = AVCaptureVideoOrientation.portrait 205 | self.cameraPreviewLayer?.frame = view.frame 206 | view.layer.insertSublayer(self.cameraPreviewLayer ?? AVCaptureVideoPreviewLayer(), at: 0) 207 | } 208 | 209 | private func setupInputOutput() { 210 | photoOutput = AVCapturePhotoOutput() 211 | guard let captureSession = captureSession else { return } 212 | guard let photoOutput = photoOutput else { return } 213 | do { 214 | captureSession.beginConfiguration() 215 | captureSession.sessionPreset = .photo 216 | let devices = self.videoDeviceDiscoverySession.devices 217 | currentDevice = devices.first(where: { $0.position == .front && $0.deviceType == .builtInTrueDepthCamera }) 218 | 219 | guard let videoDevice = currentDevice else { return } 220 | videoDeviceInput = try AVCaptureDeviceInput(device: videoDevice) 221 | 222 | if captureSession.canAddInput(videoDeviceInput) { captureSession.addInput(videoDeviceInput) } 223 | 224 | currentDevice = AVCaptureDevice.default(for: .audio) 225 | captureDeviceInput = try AVCaptureDeviceInput(device: currentDevice!) 226 | 227 | if captureSession.canAddInput(captureDeviceInput) { 228 | captureSession.addInput(captureDeviceInput) 229 | } else { 230 | print("Could not add audio device input to the session") 231 | } 232 | } catch { 233 | print(error) 234 | } 235 | 236 | if captureSession.canAddOutput(photoOutput) { 237 | captureSession.addOutput(photoOutput) 238 | 239 | photoOutput.isHighResolutionCaptureEnabled = true 240 | photoOutput.isLivePhotoCaptureEnabled = photoOutput.isLivePhotoCaptureSupported 241 | photoOutput.isDepthDataDeliveryEnabled = photoOutput.isDepthDataDeliverySupported 242 | photoOutput.isPortraitEffectsMatteDeliveryEnabled = photoOutput.isPortraitEffectsMatteDeliverySupported 243 | photoOutput.enabledSemanticSegmentationMatteTypes = photoOutput.availableSemanticSegmentationMatteTypes 244 | photoOutput.maxPhotoQualityPrioritization = .balanced 245 | captureSession.commitConfiguration() 246 | } 247 | } 248 | } 249 | 250 | //MARK: AVCapturePhotoCaptureDelegate 251 | extension MaskFilterBuiltinsMatte: AVCapturePhotoCaptureDelegate{ 252 | 253 | func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) { 254 | var uiImage: UIImage? 255 | if let imageData = photo.fileDataRepresentation() { 256 | 257 | uiImage = UIImage(data: imageData) 258 | 259 | for semanticSegmentationTypes in output.enabledSemanticSegmentationMatteTypes { 260 | if semanticSegmentationTypes == .hair { 261 | semanticSegmentationType = semanticSegmentationTypes 262 | maskFilterBuiltins(callBack(image:), photo: photo, ssmType: semanticSegmentationType!, image: uiImage ?? UIImage()) 263 | } 264 | } 265 | } 266 | } 267 | func callBack(image: UIImage?) { call(image) } 268 | } 269 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Model/MaskObservable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskObservable.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/11/01. 6 | // 7 | 8 | import Foundation 9 | 10 | final class MaskObservable { 11 | 12 | typealias Observer = (_ observable: ObservedType) -> () 13 | 14 | var value: ObservedType? { 15 | didSet { 16 | guard value.debugDescription.contains(oldValue.debugDescription) else { 17 | if let value = value { notifyObservers(value) } 18 | return 19 | } 20 | } 21 | } 22 | 23 | func initValue() { value = nil } 24 | 25 | func bind(observer: @escaping Observer) { self.observers.append(observer) } 26 | 27 | private var observers: [Observer] = [] 28 | 29 | private func notifyObservers(_ value: ObservedType) { self.observers.forEach { observer in observer(value) } 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Model/MaskPortraitMatte.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskPortraitMatteModel.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2018/09/23. 6 | // 7 | 8 | import ImageIO 9 | import AVFoundation 10 | 11 | final class MaskPortraitMatteModel: NSObject { 12 | 13 | func portraitMatte(imageV: UIImageView, minSegment: CGFloat, mo: MaskingLayerViewModel) { 14 | 15 | let defo = UserDefaults.standard 16 | let url = defo.url(forKey: "url") 17 | guard let urlSet = url else { return } 18 | var mattePixelBuffer: CVPixelBuffer? 19 | 20 | guard let source = CGImageSourceCreateWithURL(urlSet as CFURL, nil) else { return } 21 | 22 | var matteData: [String : AnyObject]? { 23 | return CGImageSourceCopyAuxiliaryDataInfoAtIndex(source, 0, kCGImageAuxiliaryDataTypePortraitEffectsMatte) as? [String : AnyObject] 24 | } 25 | 26 | do { 27 | guard let matte = matteData else { 28 | let image = UIImage(contentsOfFile: url?.path ?? "") 29 | imageV.image = image 30 | return 31 | } 32 | mattePixelBuffer = try AVPortraitEffectsMatte(fromDictionaryRepresentation: matte).mattingImage 33 | guard let pixelBuffer = mattePixelBuffer else { return } 34 | guard let image = UIImage(contentsOfFile: url!.path) else { return } 35 | guard let cgOriginalImage = image.cgImage else { return } 36 | 37 | let orgImage = CIImage(cgImage: cgOriginalImage) 38 | let transform = CGAffineTransform (scaleX: orgImage.extent.width / CIImage(cvPixelBuffer: pixelBuffer).extent.size.width, y: orgImage.extent.height / CIImage(cvPixelBuffer: pixelBuffer).extent.size.height) 39 | let maskImage = CIImage(cvPixelBuffer: pixelBuffer).transformed(by: transform) 40 | 41 | let filter = CIFilter(name: "CIBlendWithMask") 42 | filter?.setValue(orgImage, forKey: kCIInputImageKey) 43 | filter?.setValue(maskImage, forKey: kCIInputMaskImageKey) 44 | 45 | guard let outputImage = filter?.outputImage else { return } 46 | imageV.image = UIImage(ciImage: outputImage) 47 | imageV.setNeedsLayout() 48 | } catch { print(error) } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Model/MaskingLayerModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskingLayerModel.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2021/03/13. 6 | // 7 | 8 | import Foundation 9 | 10 | public struct MaskingLayerModel { 11 | public var image: UIImage? 12 | public var originPosition: CGFloat 13 | public var windowSizeWidth: CGFloat 14 | public var windowSizeHeight: CGFloat 15 | public var windowColor: UIColor 16 | public var windowAlpha: CGFloat 17 | public var imageView: UIImageView 18 | public var windowFrameView: UIView? 19 | public var copyFrame: CGRect? 20 | public var defaltImageView: UIImageView 21 | public var maskGestureView: UIView? 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/PathStruct/PathStruct.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PathStruct.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/08/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct MaskPath { 11 | static func path(from elements:[MaskPathElement], path: CGMutablePath) -> CGMutablePath { 12 | return elements.reduce(path) { (path, element) -> CGMutablePath in 13 | return element.add(to: path) 14 | } 15 | } 16 | } 17 | 18 | struct MaskMove: MaskPathElement { 19 | let pt:CGPoint 20 | init(x:CGFloat, y:CGFloat) { 21 | pt = CGPoint(x: x,y: y) 22 | } 23 | init(pt:CGPoint) { 24 | self.pt = pt 25 | } 26 | 27 | public func add(to path:CGMutablePath) -> CGMutablePath { 28 | path.move(to: pt) 29 | return path 30 | } 31 | } 32 | 33 | struct MaskLine: MaskPathElement { 34 | let pt:CGPoint 35 | init(x:CGFloat, y:CGFloat) { 36 | pt = CGPoint(x: x,y: y) 37 | } 38 | init(pt:CGPoint) { 39 | self.pt = pt 40 | } 41 | 42 | public func add(to path:CGMutablePath) -> CGMutablePath { 43 | path.addLine(to: pt) 44 | return path 45 | } 46 | } 47 | 48 | struct MaskQuadCurve: MaskPathElement { 49 | let cp:CGPoint 50 | let pt:CGPoint 51 | init(cpx: CGFloat, cpy: CGFloat, x: CGFloat, y: CGFloat) { 52 | cp = CGPoint(x: cpx, y: cpy) 53 | pt = CGPoint(x: x, y: y) 54 | } 55 | 56 | init(cp:CGPoint, pt:CGPoint) { 57 | self.cp = cp 58 | self.pt = pt 59 | } 60 | 61 | func add(to path:CGMutablePath) -> CGMutablePath { 62 | path.addQuadCurve(to: pt, control: cp) 63 | return path 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Util/MaskGesture.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskGesture.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/11/01. 6 | // 7 | 8 | struct MaskGesture { 9 | static var panGesture = UIPanGestureRecognizer() 10 | static var pinchGesture = UIPinchGestureRecognizer() 11 | static var longGesture = UILongPressGestureRecognizer() 12 | static var taoGesture = UITapGestureRecognizer() 13 | } 14 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/Util/MaskImagePicker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskImagePicker.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2018/08/26. 6 | // 7 | 8 | import Foundation 9 | import MobileCoreServices 10 | 11 | public class MaskImagePicker: NSObject, UIDocumentInteractionControllerDelegate { 12 | 13 | public func photoSegue(vc: UIViewController, mo: MaskingLayerModelView, bool: Bool) { 14 | if UIImagePickerController.isSourceTypeAvailable(.photoLibrary) { 15 | let pic = UIImagePickerController() 16 | if bool == true { pic.mediaTypes = [kUTTypeMovie as String] } 17 | pic.allowsEditing = true 18 | pic.delegate = mo 19 | vc.present(pic, animated: true) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/View/MaskingLayerModelView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskingLayerModelView.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2021/03/13. 6 | // 7 | 8 | import AVFoundation 9 | import MobileCoreServices 10 | 11 | public final class MaskingLayerModelView: NSObject { 12 | 13 | public var mv: MaskGestureViewModel? 14 | public var maskModel: MaskingLayerModel? 15 | public var mLViewModel: MaskingLayerViewModel? 16 | private var trimJudge: Bool 17 | private var orignCenter: CGFloat = 0 18 | 19 | public init(trimJudge: Bool? = nil, 20 | minSegment: CGFloat, 21 | originPosition: CGFloat, 22 | windowSizeWidth: CGFloat, 23 | windowSizeHeight: CGFloat, 24 | windowAlpha: CGFloat, 25 | windowColor: UIColor, 26 | image: UIImage?, 27 | imageView: UIImageView, 28 | maskGestureView: UIView) { 29 | 30 | mLViewModel = MaskingLayerViewModel(minSegment: minSegment) 31 | maskModel = MaskingLayerModel(image: image, 32 | originPosition: originPosition, 33 | windowSizeWidth: windowSizeWidth, 34 | windowSizeHeight: windowSizeHeight, 35 | windowColor: windowColor, 36 | windowAlpha: windowAlpha, 37 | imageView: imageView, 38 | windowFrameView: maskModel?.windowFrameView, 39 | defaltImageView: imageView, 40 | maskGestureView: maskGestureView) 41 | self.trimJudge = trimJudge ?? false 42 | 43 | super.init() 44 | frameResize(images: image, rect: imageView.frame) 45 | mv = MaskGestureViewModel(mo: mLViewModel ?? MaskingLayerViewModel(minSegment: minSegment), modelView: self) 46 | orignCenter = (maskModel?.defaltImageView.frame.height ?? 0)/2 + (maskModel?.defaltImageView.frame.origin.y ?? 0) 47 | } 48 | 49 | public func desginInit() { 50 | guard let size = maskModel else { return } 51 | 52 | orignCenter = (maskModel?.defaltImageView.frame.height ?? 0)/2 + (maskModel?.defaltImageView.frame.origin.y ?? 0) 53 | maskModel?.imageView.transform = CGAffineTransform(scaleX: 1, y: 1) 54 | maskModel?.imageView.center = CGPoint(x:(maskModel?.defaltImageView.frame.width ?? 0) / 2, 55 | y: orignCenter) 56 | maskModel?.windowFrameView?.isHidden = false 57 | mLViewModel?.maskLayer?.mutablePathSet(modelView: self) 58 | maskModel?.windowFrameView = UIView(frame: CGRect(x: 0, 59 | y: 0, 60 | width: size.windowSizeWidth, 61 | height: size.windowSizeHeight)) 62 | maskModel?.windowFrameView?.backgroundColor = maskModel?.windowColor 63 | maskModel?.windowFrameView?.alpha = maskModel?.windowAlpha ?? 0 64 | 65 | maskModel?.imageView.addSubview(maskModel?.windowFrameView ?? UIImageView()) 66 | } 67 | 68 | public func frameResize(images: UIImage?, rect: CGRect) { 69 | guard let maskLayer = mLViewModel?.maskLayer, let model = maskModel, let images = images else { return } 70 | maskModel?.imageView.frame = rect 71 | maskModel?.image = images.ResizeUIImage(width: rect.width, 72 | height: rect.height) 73 | 74 | let imageSize = AVMakeRect(aspectRatio: images.size, 75 | insideRect: model.imageView.bounds) 76 | model.imageView.image = maskModel?.image 77 | model.imageView.frame.size = imageSize.size 78 | model.imageView.center = CGPoint(x: rect.width/2, y: rect.origin.y + rect.height/2) 79 | 80 | if model.defaltImageView.image == nil { 81 | maskModel?.defaltImageView.frame = maskModel?.imageView.frame ?? CGRect() 82 | mLViewModel?.maskPathSet(maskLayer: maskLayer, model: model) 83 | } 84 | 85 | maskModel?.defaltImageView.image = maskModel?.imageView.image 86 | } 87 | 88 | func imageResize() { 89 | maskModel?.imageView.transform = CGAffineTransform(scaleX: 1, y: 1) 90 | maskModel?.imageView.center = CGPoint(x:(maskModel?.defaltImageView.frame.width ?? 0) / 2, 91 | y: orignCenter) 92 | maskModel?.windowFrameView?.removeFromSuperview() 93 | maskModel?.windowFrameView = nil 94 | maskModel?.imageView.layer.mask?.removeFromSuperlayer() 95 | maskModel?.imageView.frame = maskModel?.defaltImageView.frame ?? CGRect() 96 | maskModel?.imageView.image = maskModel?.image 97 | } 98 | 99 | } 100 | 101 | // MARK: UIPanGestureRecognizer 102 | 103 | extension MaskingLayerModelView { 104 | 105 | func panTapped(sender: UIPanGestureRecognizer) { 106 | guard let maskGestureView = maskModel?.maskGestureView, 107 | let imageView = maskModel?.imageView, 108 | let originPosition = maskModel?.originPosition, 109 | let panGestureStartX = mLViewModel?.panGestureStartX, 110 | let panGestureStartY = mLViewModel?.panGestureStartY else { return } 111 | let position: CGPoint = sender.location(in: (maskModel?.windowFrameView?.isHidden ?? true) ? maskGestureView : imageView) 112 | 113 | switch sender.state { 114 | case .ended: 115 | switch maskModel?.windowFrameView { 116 | case nil: 117 | panGestureStartX > position.x ? 118 | (mLViewModel?.panGestureRect = CGRect(x: position.x, y: panGestureStartY + imageView.frame.origin.y, width: panGestureStartX - position.x, height: mLViewModel?.maskLayer?.trimWith ?? 0.0)): 119 | (mLViewModel?.panGestureRect = CGRect(x: panGestureStartX, y: panGestureStartY + imageView.frame.origin.y, width: position.x - panGestureStartX, height: mLViewModel?.maskLayer?.trimWith ?? 0.0)) 120 | 121 | mLViewModel?.maskLayer?.clipLayer.name == "trimLayer" ? 122 | mLViewModel?.endPangesture(position: CGPoint(x: position.x, y: panGestureStartY), imageView: imageView) : 123 | mLViewModel?.maskPathEnded(position: CGPoint(x: position.x, y: position.y - originPosition), model: maskModel) 124 | case.some: 125 | guard let windowFrame = maskModel?.windowFrameView?.frame else { return } 126 | maskModel?.windowFrameView?.isHidden ?? false ? 127 | (maskModel?.imageView.frame.origin = CGPoint(x: position.x + ( -(imageView.frame.width)/2), 128 | y: position.y + ( -(imageView.frame.height)/2))) : 129 | (maskModel?.windowFrameView?.frame.origin = CGPoint(x: position.x + ( -(windowFrame.width)/2), 130 | y: position.y + ( -(windowFrame.height)*2))) 131 | } 132 | break 133 | case .possible: break 134 | case .began: 135 | switch maskModel?.windowFrameView { 136 | case nil: 137 | mLViewModel?.panGestureStartY = position.y + ( -(imageView.frame.height)/2) 138 | mLViewModel?.panGestureStartX = position.x 139 | mLViewModel?.maskLayer?.clipLayer.name == "trimLayer" ? 140 | mLViewModel?.maskPathBegan(position: CGPoint(x: position.x, y: mLViewModel?.panGestureStartY ?? 0.0)) : 141 | mLViewModel?.maskPathBegan(position: CGPoint(x: position.x, y: position.y - originPosition)) 142 | case.some: 143 | guard let windowFrame = maskModel?.windowFrameView?.frame else { return } 144 | maskModel?.windowFrameView?.isHidden ?? false ? 145 | (maskModel?.imageView.frame.origin = CGPoint(x: position.x + ( -(imageView.frame.width)/2), 146 | y: position.y + ( -(imageView.frame.height)/2))) : 147 | (maskModel?.windowFrameView?.frame.origin = CGPoint(x: position.x + ( -(windowFrame.width)/2), 148 | y: position.y + ( -(windowFrame.height)*2))) 149 | } 150 | break 151 | case .changed: 152 | switch maskModel?.windowFrameView { 153 | case nil: 154 | mLViewModel?.maskLayer?.clipLayer.name == "trimLayer" ? 155 | mLViewModel?.maskAddLine(position: CGPoint(x: position.x, y: panGestureStartY)) : 156 | mLViewModel?.maskAddLine(position: CGPoint(x: position.x, y: position.y - originPosition)) 157 | case.some: 158 | guard let windowFrame = maskModel?.windowFrameView?.frame else { return } 159 | maskModel?.windowFrameView?.isHidden ?? false ? 160 | (maskModel?.imageView.frame.origin = CGPoint(x: position.x + ( -(imageView.frame.width)/2), 161 | y: position.y + ( -(imageView.frame.height)/2))) : 162 | (maskModel?.windowFrameView?.frame.origin = CGPoint(x: position.x + ( -(windowFrame.width)/2), 163 | y: position.y + ( -(windowFrame.height)*2))) 164 | } 165 | break 166 | case .cancelled: break 167 | case .failed: break 168 | @unknown default: break 169 | } 170 | } 171 | 172 | func longTapeed(sender: UILongPressGestureRecognizer) { 173 | if maskModel?.windowFrameView?.isHidden == false { 174 | maskModel?.windowFrameView?.frame.size.height += 1 175 | } 176 | } 177 | 178 | func pinchAction(sender: UIPinchGestureRecognizer) { 179 | let rate = sender.scale 180 | maskModel?.windowFrameView?.isHidden == true ? 181 | (maskModel?.imageView.transform = CGAffineTransform(scaleX: rate, y: rate)): 182 | (maskModel?.windowFrameView?.transform = CGAffineTransform(scaleX: rate, y: trimJudge ? 1 : rate)) 183 | 184 | } 185 | 186 | func tapAction(sender: UITapGestureRecognizer) { 187 | maskModel?.windowFrameView?.isHidden == true ? 188 | (maskModel?.windowFrameView?.isHidden = false) : 189 | (maskModel?.windowFrameView?.isHidden = true) 190 | maskModel?.windowFrameView?.frame.size = CGSize(width: maskModel?.windowSizeWidth ?? 0, 191 | height: maskModel?.windowSizeHeight ?? 0) 192 | } 193 | 194 | } 195 | 196 | // MARK: UIImagePickerControllerDelegate & UINavigationControllerDelegate 197 | 198 | extension MaskingLayerModelView: UIImagePickerControllerDelegate & UINavigationControllerDelegate { 199 | public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { 200 | let info = convertFromUIImagePickerControllerInfoKeyDictionary(info) 201 | 202 | guard let images = (info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.originalImage)] as? UIImage) else { return } 203 | picker.dismiss(animated: true, completion: { [self] in 204 | frameResize(images: images, rect: self.maskModel?.imageView.frame ?? CGRect()) 205 | mLViewModel?.maskPathBegan(position: CGPoint()) 206 | mLViewModel?.maskCount.value = 0 207 | }) 208 | } 209 | 210 | public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { 211 | picker.dismiss(animated: true, completion: nil) 212 | } 213 | public func convertFromUIImagePickerControllerInfoKeyDictionary(_ input: [UIImagePickerController.InfoKey: Any]) -> [String: Any] { 214 | return Dictionary(uniqueKeysWithValues: input.map {key, value in (key.rawValue, value)}) 215 | } 216 | public func convertFromUIImagePickerControllerInfoKey(_ input: UIImagePickerController.InfoKey) -> String { 217 | return input.rawValue 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/View/SliiderObjectsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SliiderObjectsView.swift 3 | // MaskMatte 4 | // 5 | // Created by 永田大祐 on 2019/11/05. 6 | // Copyright © 2019 永田大祐. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SliiderObjectsView: UIView, UIGestureRecognizerDelegate { 12 | 13 | @IBOutlet weak var sliderImageView: UIImageView! 14 | 15 | @IBOutlet weak var sliderView: UIStackView! 16 | 17 | @IBOutlet weak var sliderInputRVector: UISlider!{ 18 | didSet { 19 | sliderInputRVector.value = 1.0 20 | } 21 | } 22 | @IBOutlet weak var sliderInputGVector: UISlider!{ 23 | didSet { 24 | sliderInputGVector.value = 1.0 25 | } 26 | } 27 | @IBOutlet weak var sliderInputBVector: UISlider!{ 28 | didSet { 29 | sliderInputBVector.value = 1.0 30 | } 31 | } 32 | @IBOutlet weak var sliderInputAVector: UISlider!{ 33 | didSet { 34 | sliderInputAVector.value = 1.0 35 | } 36 | } 37 | 38 | private var panGesture = UIPanGestureRecognizer() 39 | private var longTapGesture = UILongPressGestureRecognizer() 40 | 41 | private var height: CGFloat = 50 42 | 43 | init(frameHight: CGFloat) { 44 | super.init(frame: .zero) 45 | 46 | loadNib() 47 | pGesture() 48 | height = frameHight 49 | } 50 | 51 | required init?(coder: NSCoder) { 52 | super.init(coder: coder) 53 | } 54 | 55 | func loadNib() { 56 | let bundle = Bundle(for: SliiderObjectsView.self) 57 | let view = bundle.loadNibNamed("SliiderObjectsView", owner: self, options: nil)?.first as? UIView 58 | view?.frame = UIScreen.main.bounds 59 | self.addSubview(view ?? UIView()) 60 | self.subviews[0].backgroundColor = .black 61 | } 62 | 63 | func returnAnimation() { 64 | sliderImageView.frame.origin.y -= self.frame.height/2 - height 65 | sliderImageView.transform = sliderImageView.transform.scaledBy(x: 0.9, y: 0.9) 66 | UIView.animate(withDuration: 0.4) { 67 | self.sliderImageView.transform = .identity 68 | self.sliderImageView.frame.origin.y += self.frame.height/2 - self.height 69 | self.subviews[0].bringSubviewToFront(self.sliderImageView) 70 | } 71 | } 72 | 73 | private func pGesture() { 74 | panGesture = UIPanGestureRecognizer(target: self, action:#selector(panTapped(sender:))) 75 | panGesture.delegate = self 76 | self.addGestureRecognizer(panGesture) 77 | 78 | longTapGesture = UILongPressGestureRecognizer(target: self, action:#selector(longTapped(sender:))) 79 | longTapGesture.delegate = self 80 | self.addGestureRecognizer(longTapGesture) 81 | } 82 | 83 | @objc private func longTapped(sender: UILongPressGestureRecognizer) { 84 | subviews[0].subviews[0] == sliderImageView ? returnAnimation() : nil 85 | } 86 | 87 | @objc private func panTapped(sender: UIPanGestureRecognizer) { 88 | switch sender.state { 89 | case .ended: 90 | if subviews[0].subviews[0] == sliderView { 91 | self.sliderImageView.transform = self.sliderImageView.transform.scaledBy(x: 0.9, y: 0.9) 92 | self.sliderImageView.frame.origin.y = 0 93 | self.subviews[0].bringSubviewToFront(self.sliderView) 94 | } 95 | break 96 | case .possible: break 97 | case .began: subviews[0].subviews[0] == sliderView ? self.sliderImageView.frame.origin.y -= self.frame.height/2 - self.height: nil 98 | case .changed: break 99 | case .cancelled: break 100 | case .failed: break 101 | @unknown default: break 102 | } 103 | } 104 | 105 | @IBAction func sliderInputRVector(_ sender: UISlider) { sliderInputRVector.value = sender.value } 106 | 107 | @IBAction func sliderInputGVector(_ sender: UISlider) { sliderInputGVector.value = sender.value } 108 | 109 | @IBAction func sliderInputBVector(_ sender: UISlider) { sliderInputBVector.value = sender.value } 110 | 111 | @IBAction func sliderInputAVector(_ sender: UISlider) { sliderInputAVector.value = sender.value } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/View/SliiderObjectsView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/ViwModel/MaskGestureViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskGestureViewModel.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2019/11/01. 6 | // 7 | 8 | import UIKit 9 | 10 | public class MaskGestureViewModel: NSObject, UIGestureRecognizerDelegate { 11 | 12 | public var mLViewModel: MaskingLayerViewModel? 13 | public var modelView: MaskingLayerModelView? 14 | 15 | public init(mo: MaskingLayerViewModel, modelView: MaskingLayerModelView?) { 16 | super.init() 17 | self.modelView = modelView 18 | mLViewModel = mo 19 | desgin(mo: mo) 20 | } 21 | 22 | public func cameraObserve(_ bind: @escaping () -> Void) { 23 | mLViewModel?.observe(for: mLViewModel?.cameraCount ?? MaskObservable()) { _ in 24 | self.mLViewModel?.cameraCount.initValue() 25 | bind() 26 | } 27 | } 28 | 29 | public func pinchAndTapGesture() { 30 | MaskGesture.pinchGesture = UIPinchGestureRecognizer(target: self, action:#selector(pinchTapeed)) 31 | MaskGesture.pinchGesture.delegate = self 32 | modelView?.maskModel?.maskGestureView?.addGestureRecognizer(MaskGesture.pinchGesture) 33 | 34 | MaskGesture.taoGesture = UITapGestureRecognizer(target: self, action:#selector(tapeed)) 35 | MaskGesture.taoGesture.delegate = self 36 | modelView?.maskModel?.maskGestureView?.addGestureRecognizer(MaskGesture.taoGesture) 37 | } 38 | 39 | private func desgin(mo: MaskingLayerViewModel) { 40 | mLViewModel = mo 41 | guard let modelView = modelView, let imageView = modelView.maskModel?.imageView else { return } 42 | modelView.maskModel?.maskGestureView?.addSubview(imageView) 43 | imageView.layer.addSublayer(mo.maskLayer?.clipLayer ?? CALayer()) 44 | 45 | MaskGesture.panGesture = UIPanGestureRecognizer(target: self, action:#selector(panTapped)) 46 | MaskGesture.panGesture.delegate = self 47 | modelView.maskModel?.maskGestureView?.addGestureRecognizer(MaskGesture.panGesture) 48 | 49 | MaskGesture.longGesture = UILongPressGestureRecognizer(target: self, action:#selector(longTapeed)) 50 | MaskGesture.longGesture.delegate = self 51 | modelView.maskModel?.maskGestureView?.addGestureRecognizer(MaskGesture.longGesture) 52 | } 53 | 54 | @objc private func panTapped(sender: UIPanGestureRecognizer) { modelView?.panTapped(sender: sender) } 55 | 56 | @objc private func longTapeed(sender: UILongPressGestureRecognizer) { modelView?.longTapeed(sender: sender) } 57 | 58 | @objc private func pinchTapeed(sender: UIPinchGestureRecognizer) { modelView?.pinchAction(sender: sender) } 59 | 60 | @objc private func tapeed(sender: UITapGestureRecognizer) { modelView?.tapAction(sender: sender) } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/ViwModel/MaskLayer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskLayer.swift 3 | // MaskingLayer 4 | // 5 | // Created by daisukenagata on 2018/08/04. 6 | // Copyright © 2018年 daisukenagata. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @available(iOS 13.0, *) 12 | public final class MaskLayer: NSObject { 13 | 14 | public var maskColor = UIColor() 15 | public var minSegment: CGFloat 16 | public var trimWith: CGFloat = 10 17 | public var maskWidth: CGFloat = 1 18 | public var strokeColor = UIColor() 19 | public var strokeALpha = CGFloat() 20 | public var maskImagePicker = MaskImagePicker() 21 | 22 | var elements:[MaskPathElement] 23 | var convertPath = CGMutablePath() 24 | var clipLayer = CAShapeLayer() 25 | 26 | private var path = CGMutablePath() 27 | private var length = 0 as CGFloat 28 | private var anchor = CGPoint.zero // last anchor point 29 | private var last = CGPoint.zero // last touch point 30 | private var delta = CGPoint.zero // last movement to compare against to detect a sharp turn 31 | private var fEdge = true //either the begging or the turning point 32 | 33 | public init(minSegment: CGFloat) { 34 | self.elements = [MaskPathElement]() 35 | self.minSegment = minSegment 36 | super.init() 37 | self.maskLayer() 38 | } 39 | 40 | public func colorSet(imageView: UIImageView, color: UIColor) { maskColor = color } 41 | 42 | public func mutablePathSet(modelView: MaskingLayerModelView? = nil) { 43 | modelView?.imageResize() 44 | convertPath = CGMutablePath() 45 | path = CGMutablePath() 46 | trimWith = 10 47 | clipLayer.lineWidth = maskWidth 48 | clipLayer.path = nil 49 | } 50 | 51 | public func cameraSelect(mo: MaskingLayerViewModel? = nil) { mo?.cameraCount.value = 0 } 52 | 53 | public func maskLayer() { 54 | maskColor = .white 55 | clipLayer.name = "clipLayer" 56 | clipLayer.lineCap = .round 57 | clipLayer.lineJoin = .round 58 | clipLayer.fillColor = UIColor.clear.cgColor 59 | clipLayer.strokeColor = UIColor.white.cgColor 60 | clipLayer.backgroundColor = UIColor.clear.cgColor 61 | clipLayer.contentsScale = UIScreen.main.scale 62 | clipLayer.lineWidth = maskWidth 63 | } 64 | 65 | public func trimLayer(modelView: MaskingLayerModelView? = nil) { 66 | mutablePathSet(modelView: modelView) 67 | maskColor = .white 68 | clipLayer.name = "trimLayer" 69 | clipLayer.lineCap = .butt 70 | clipLayer.lineJoin = .bevel 71 | clipLayer.fillColor = UIColor.clear.cgColor 72 | clipLayer.strokeColor = strokeColor.cgColor.copy(alpha: strokeALpha) 73 | clipLayer.backgroundColor = UIColor.clear.cgColor 74 | clipLayer.lineWidth = trimWith 75 | } 76 | 77 | func longtappedSelect(mo: MaskingLayerViewModel) -> MaskLayer { return self } 78 | 79 | 80 | func maskImage(color: UIColor, size: CGSize,convertPath: CGMutablePath) -> UIImage { 81 | return mask(image: image(color: color, size: size), convertPath: convertPath) 82 | } 83 | 84 | func imageSet(imageView: UIImageView, image: UIImage) { 85 | imageView.image = image.mask(image: imageView.image) 86 | imageView.image = imageView.image?.ResizeUIImage(width: imageView.frame.width, height: imageView.frame.height) 87 | 88 | guard clipLayer.strokeEnd == 0 else { 89 | path = CGMutablePath() 90 | return 91 | } 92 | } 93 | 94 | func start(_ pt:CGPoint) -> CGPath? { 95 | path = CGMutablePath() 96 | path.move(to: pt) 97 | elements = [MaskMove(x: pt.x, y: pt.y)] 98 | anchor = pt 99 | last = pt 100 | fEdge = true 101 | length = 0.0 102 | return path 103 | } 104 | 105 | func move(_ pt: CGPoint) -> CGPath? { 106 | var pathToReturn:CGPath? 107 | let d = pt.delta(last) 108 | length += sqrt(d.dotProduct(d)) 109 | if length > minSegment { 110 | // Detected enough movement. Add a quad segment, if we are not at the edge. 111 | if !fEdge { 112 | let ptMid = anchor.middle(pt) 113 | path.addQuadCurve(to: pt, control: anchor) 114 | elements.append(MaskQuadCurve(cpx: anchor.x, cpy: anchor.y, x: ptMid.x, y: ptMid.y)) 115 | pathToReturn = path 116 | } 117 | delta = pt.delta(anchor) 118 | anchor = pt 119 | fEdge = false 120 | length = 0.0 121 | } else if !fEdge && delta.dotProduct(d) < 0 { 122 | pathToReturn = path 123 | anchor = last // matter for delta in "Neither" case (does not matter for QuadCurve, see above) 124 | fEdge = true 125 | length = 0.0 126 | } else { 127 | // Neigher. Return the path with a line to the current point as a transient path. 128 | if let pathTemp = path.mutableCopy() { 129 | pathTemp.addLine(to: pt) 130 | pathToReturn = pathTemp 131 | delta = pt.delta(anchor) 132 | } else { 133 | assertionFailure("SNPathBuilder: CGPathCreateMutableCopy should not fail.") 134 | } 135 | } 136 | last = pt 137 | return pathToReturn 138 | } 139 | 140 | private func convertPath(convertLocation: CGPoint) { convertPath.move(to: CGPoint(x: convertLocation.x, y: convertLocation.y)) } 141 | 142 | private func mask(image: UIImage,convertPath: CGMutablePath) -> UIImage { 143 | clipLayer.isHidden = true 144 | return clipedMotoImage(image,convertPath:convertPath) 145 | } 146 | 147 | private func image(color: UIColor, size: CGSize) -> UIImage { 148 | UIGraphicsBeginImageContextWithOptions(size, false, 0.0) 149 | 150 | let context = UIGraphicsGetCurrentContext()! 151 | context.setFillColor(color.cgColor) 152 | context.fill(CGRect(origin: .zero, size: size)) 153 | 154 | let image = UIGraphicsGetImageFromCurrentImageContext()! 155 | UIGraphicsEndImageContext() 156 | 157 | return image 158 | } 159 | 160 | private func clipedMotoImage(_ img: UIImage,convertPath: CGMutablePath) -> UIImage { 161 | let motoImage = img 162 | 163 | UIGraphicsBeginImageContextWithOptions((motoImage.size), false, 0) 164 | let context = UIGraphicsGetCurrentContext() 165 | context?.saveGState() 166 | 167 | motoImage.draw(in: CGRect(x: 0, y: 0, width: (motoImage.size.width), height: (motoImage.size.height))) 168 | context?.addPath(convertPath) 169 | 170 | context?.setFillColor(UIColor.black.cgColor) 171 | context?.drawPath(using: CGPathDrawingMode.fillStroke) 172 | 173 | let reImage = UIGraphicsGetImageFromCurrentImageContext() 174 | context?.restoreGState() 175 | UIGraphicsEndImageContext() 176 | 177 | return reImage ?? UIImage () 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/Pods/MaskingLayer/Classes/ViwModel/MaskingLayerViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaskingLayerViewModel.swift 3 | // MaskingLayer 4 | // 5 | // Created by 永田大祐 on 2018/09/01. 6 | // 7 | 8 | import Foundation 9 | import AVFoundation 10 | import MobileCoreServices 11 | 12 | public class MaskingLayerViewModel: NSObject, CViewProtocol { 13 | 14 | public var maskLayer: MaskLayer? 15 | 16 | var collectionTappedCount = MaskObservable() 17 | var backImageCount = MaskObservable() 18 | var cameraCount = MaskObservable() 19 | var maskCount = MaskObservable() 20 | var panGestureStartY = CGFloat() 21 | var panGestureStartX = CGFloat() 22 | var panGestureRect = CGRect() 23 | 24 | private var margin: CGFloat = 10 25 | private var defaultHight: CGFloat = 30 26 | 27 | // DyeHair Camera Setting 28 | private var maskPortraitMatte: MaskFilterBuiltinsMatte? = nil 29 | 30 | public init(minSegment: CGFloat? = nil) { 31 | maskLayer = MaskLayer(minSegment: minSegment ?? 0.0) 32 | } 33 | 34 | public func collectionTapped() { 35 | collectionTappedCount.value = 0 36 | } 37 | 38 | func maskPortraitMatte(minSegment: CGFloat, imageView: UIImageView) { 39 | DispatchQueue.main.async { 40 | let maskPortraitMatte = MaskPortraitMatteModel() 41 | maskPortraitMatte.portraitMatte(imageV : imageView, 42 | minSegment: minSegment, mo: self) 43 | } 44 | } 45 | 46 | func maskPathSet(maskLayer: MaskLayer, model: MaskingLayerModel) { 47 | maskLayer.maskColor = .clear 48 | maskPathEnded(position: CGPoint(), model: model) 49 | maskLayer.clipLayer.name == "trimLayer" ? (maskLayer.maskColor = .black) : (maskLayer.maskColor = .white) 50 | } 51 | } 52 | 53 | // MARK: UICollectionViewDelegateFlowLayout 54 | extension MaskingLayerViewModel: UICollectionViewDelegateFlowLayout { 55 | 56 | public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { 57 | return UIEdgeInsets(top: 0, left: margin, bottom: 0, right: margin) 58 | } 59 | 60 | public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { 61 | return margin 62 | } 63 | } 64 | 65 | // MARK: Mask 66 | 67 | extension MaskingLayerViewModel { 68 | 69 | public func imageMask(imageView: UIImageView) { 70 | guard let image = imageView.image, let trimWidth = maskLayer?.trimWith else { return } 71 | 72 | let layer = CALayer() 73 | layer.contents = image.cgImage 74 | layer.contentsScale = image.scale 75 | layer.contentsCenter = CGRect( 76 | x: ((image.size.width/2) - 1)/image.size.width, 77 | y: ((image.size.height/2) - 1)/image.size.height, 78 | width: 1 / image.size.width, 79 | height: 1 / image.size.height) 80 | layer.frame = imageView.bounds.insetBy(dx: panGestureRect.origin.x, dy: 0) 81 | layer.frame.size.height = trimWidth 82 | layer.frame.size.width = panGestureRect.width 83 | layer.frame.origin.y = panGestureRect.origin.y - (imageView.frame.origin.y + trimWidth/2) 84 | imageView.layer.mask = layer 85 | maskLayer?.clipLayer.strokeColor = UIColor.clear.cgColor 86 | } 87 | 88 | public func lockImageMask(imageView: UIImageView, windowFrameView: UIView) { 89 | guard let image = imageView.image else { return } 90 | 91 | let layer = CALayer() 92 | layer.contents = image.cgImage 93 | layer.contentsScale = image.scale 94 | layer.frame = windowFrameView.frame 95 | windowFrameView.removeFromSuperview() 96 | imageView.layer.mask = layer 97 | getScreenShot(imageView) 98 | maskLayer?.clipLayer.strokeColor = UIColor.clear.cgColor 99 | } 100 | 101 | func maskPathBegan(position: CGPoint) { 102 | guard let maskLayer = maskLayer else { return } 103 | 104 | maskLayer.clipLayer.name == "trimLayer" ? (maskLayer.clipLayer.lineWidth = maskLayer.trimWith) : (maskLayer.clipLayer.lineWidth = maskLayer.maskWidth) 105 | maskLayer.clipLayer.isHidden = false 106 | if let path = maskLayer.start(position) { 107 | maskLayer.clipLayer.path = path 108 | } 109 | } 110 | 111 | func maskAddLine(position: CGPoint) { 112 | guard let maskLayer = maskLayer else { return } 113 | 114 | if let path = maskLayer.move(position) { 115 | maskLayer.clipLayer.path = path 116 | } 117 | } 118 | 119 | func maskPathEnded(position: CGPoint, model: MaskingLayerModel?) { 120 | guard let maskLayer = maskLayer else { return } 121 | 122 | var elements = maskLayer.elements 123 | elements.insert(MaskMove(x: position.x, y: position.y), at: 0) 124 | elements.append(MaskLine(x: position.x, y: position.y)) 125 | maskLayer.clipLayer.path = MaskPath.path(from: elements, path: maskLayer.convertPath) 126 | 127 | model?.imageView.image = maskLayer.maskImage(color: maskLayer.maskColor, 128 | size: model?.imageView.frame.size ?? CGSize(), 129 | convertPath: MaskPath.path(from: elements, path: maskLayer.convertPath)) 130 | maskLayer.imageSet(imageView: model?.imageView ?? UIImageView(), 131 | image: model?.image ?? UIImage()) 132 | } 133 | 134 | func endPangesture(position: CGPoint, imageView: UIImageView) { 135 | guard let maskLayer = maskLayer else { return } 136 | 137 | maskLayer.trimWith = defaultHight 138 | panGestureRect.size.height = maskLayer.trimWith 139 | maskLayer.clipLayer.lineWidth = maskLayer.trimWith 140 | } 141 | 142 | private func getScreenShot(_ imageView: UIImageView) { 143 | let rect = imageView.bounds 144 | UIGraphicsBeginImageContextWithOptions(rect.size, false, 0.0) 145 | let context: CGContext = UIGraphicsGetCurrentContext()! 146 | imageView.layer.render(in: context) 147 | let capturedImage : UIImage = UIGraphicsGetImageFromCurrentImageContext() ?? UIImage() 148 | UIGraphicsEndImageContext() 149 | imageView.image = capturedImage 150 | } 151 | } 152 | 153 | 154 | // MARK: Observer 155 | extension MaskingLayerViewModel: Observer { 156 | 157 | func observe(for observable: MaskObservable, with: @escaping (O) -> Void) { observable.bind(observer: with) } 158 | 159 | func call() { 160 | DispatchQueue.main.async { 161 | self.maskCount.value = 0 162 | } 163 | } 164 | } 165 | 166 | // MARK: cmareraLogic 167 | extension MaskingLayerViewModel { 168 | // cmareraPreView 169 | public func cmareraPreView(_ view: UIView) { 170 | self.maskPortraitMatte = MaskFilterBuiltinsMatte() 171 | self.maskPortraitMatte?.setMaskFilter(view: view) 172 | } 173 | 174 | public func btAction(view: UIView) { 175 | maskPortraitMatte?.btAction(view: view, tabHeight: 0) 176 | } 177 | 178 | public func cameraAction() { 179 | maskPortraitMatte?.uIImageWriteToSavedPhotosAlbum() 180 | } 181 | 182 | public func cameraReset(view: UIView) { 183 | view.removeFromSuperview() 184 | maskPortraitMatte?.cameraReset() 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /Example/Pods/MaskingLayer/README.md: -------------------------------------------------------------------------------- 1 | # MaskingLayer 2 | 3 |

4 | 5 |

6 | 7 | [![Version](https://img.shields.io/cocoapods/v/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 8 | [![License](https://img.shields.io/cocoapods/l/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 9 | [![Platform](https://img.shields.io/cocoapods/p/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 10 | 11 | ## Example 12 | 13 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 14 | You can select background color, camera roll, video roll with long tap. 15 | 16 | Example ViewController 17 | ```ruby 18 | import UIKit 19 | import MaskingLayer 20 | 21 | class ViewController: UIViewController { 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | 26 | let mO = MaskingLayerViewModel(minSegment: 15) 27 | let MV = MaskGestureViewModel(mO: mO, vc: self) 28 | MV.maskGestureView?.frame = view.frame 29 | view.addSubview(MV.maskGestureView ?? UIView()) 30 | 31 | mO.frameResize(images: UIImage(named: "IMG_4011")!) 32 | } 33 | } 34 | 35 | ``` 36 | 37 | 38 | ## Version 0.4.2 39 | You can generate a GIF image by pressing the leftmost image. 40 | 41 | 42 | ## Gif 43 | ![](https://user-images.githubusercontent.com/16457165/68522335-96e02c80-02ed-11ea-876a-bffcd7158b5e.gif) 44 | ![](https://user-images.githubusercontent.com/16457165/68522372-e45c9980-02ed-11ea-9f6c-3b5d91a0a8b5.gif) 45 | 46 | 47 | 48 | ## Version 0.5 Version 0.5.1 49 | Os12 portrait camera with iphoneX or higher, masking images where people are reflections 50 | ![](https://user-images.githubusercontent.com/16457165/68522380-0eae5700-02ee-11ea-9cc6-7840ae601eeb.gif) 51 | ![](https://user-images.githubusercontent.com/16457165/68522388-300f4300-02ee-11ea-9bec-ee8afe609aa7.gif) 52 | ## Version 0.6.4 53 | Press BackImage with a long tap and decide the background, then select portrait camera image 54 | 55 | 56 | ## Version 0.6.5 57 | Added a compositing function that can be saved to the terminal. 58 | 59 | 60 | 61 | ## Version 0.8 ~ 62 | 63 | The left is the latest version. Perform a smooth crop. 64 | ![](https://user-images.githubusercontent.com/16457165/63633553-2ed26080-c685-11e9-8c91-17e3eb36dc3f.gif) 65 | 66 | ## Version 1.0.0 ~ 67 | 68 | ```ruby 69 | 1. Select hair dyeing with a long tap 70 | 71 | 2. Selfie with red button 72 | 73 | 3. Save the photo with the blue button 74 | 75 | Screen operation 76 | 1. Up swipe is Display of slider bar 77 | 2. Long tap is Hide slider bar 78 | ``` 79 | ## Operation link 80 | 81 | ### [link](https://twitter.com/dbank0208/status/1192846922563739649?s=20) 82 | 83 | 84 | ## Example Code 85 | ```ruby 86 | import UIKit 87 | import MaskingLayer 88 | 89 | class CameraViewController: UIViewController { 90 | 91 | static func identifier() -> String { return String(describing: ViewController.self) } 92 | 93 | static func viewController() -> ViewController { 94 | 95 | let sb = UIStoryboard(name: "Camera", bundle: nil) 96 | let vc = sb.instantiateInitialViewController() as! ViewController 97 | return vc 98 | } 99 | 100 | private var mVM : MaskingLayerViewModel? = nil 101 | private var mBObject : MaskButtonView? = nil 102 | private var d: UIView? 103 | 104 | override func viewDidLoad() { 105 | super.viewDidLoad() 106 | 107 | d = UIView(frame: CGRect(x: 0, y: 44, width: self.view.frame.width, height: self.view.frame.height - 188)) 108 | } 109 | override func viewDidAppear(_ animated: Bool) { 110 | super.viewDidAppear(true) 111 | 112 | mBObject?.cameraMatte.isHidden = false 113 | mBObject?.cameraRecord.isHidden = false 114 | 115 | mVM = MaskingLayerViewModel(vc: self) 116 | mBObject = MaskButtonView(frame: self.tabBarController?.tabBar.frame ?? CGRect()) 117 | 118 | self.tabBarController?.tabBar.addSubview(mBObject?.cameraMatte ?? UIButton()) 119 | self.tabBarController?.tabBar.addSubview(mBObject?.cameraRecord ?? UIButton()) 120 | 121 | mBObject?.cameraMatte.addTarget(self, action: #selector(btAction), for: .touchUpInside) 122 | mBObject?.cameraRecord.addTarget(self, action: #selector(cameraAction), for: .touchUpInside) 123 | 124 | view.addSubview(d ?? UIView()) 125 | mVM?.cmareraPreView(d ?? UIView()) 126 | 127 | } 128 | 129 | override func viewWillDisappear(_ animated: Bool) { 130 | super.viewWillDisappear(true) 131 | 132 | mBObject?.cameraMatte.isHidden = true 133 | mBObject?.cameraRecord.isHidden = true 134 | d?.removeFromSuperview() 135 | mVM?.cameraReset() 136 | mVM = nil 137 | } 138 | 139 | // DyeHair Set 140 | @objc func btAction() { mVM?.btAction() } 141 | 142 | // Save photosAlbum 143 | @objc func cameraAction() { mVM?.cameraAction() } 144 | 145 | } 146 | 147 | ``` 148 | ## Installation 149 | 150 | MaskingLayer is available through [CocoaPods](https://cocoapods.org). To install 151 | it, simply add the following line to your Podfile: 152 | 153 | ```ruby 154 | pod 'MaskingLayer' 155 | ``` 156 | 157 | ## Author 158 | 159 | daisukenagata, dbank0208@gmail.com 160 | 161 | ## License 162 | 163 | MaskingLayer is available under the MIT license. See the LICENSE file for more info. 164 | 165 | 166 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0E6BB75646C89A96232899B76B26EDBD /* MaskingLayer-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AC40FB670BA290F041DF24397E24788 /* MaskingLayer-dummy.m */; }; 11 | 0F486711CE0F9E53026E6607EF994FA3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; 12 | 17D2028E1AC4E1A41F78EEA05C067C2C /* MaskingLayer-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B5E5106A5425863623B4547A765CE692 /* MaskingLayer-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 1EBCBA507A8740A94B643EFDFAFF10F7 /* Pods-MaskingLayer_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 185A35A75FD2463A6E584A525D2E19BA /* Pods-MaskingLayer_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | BB404A12255FFF490004AF87 /* MaskProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4049F8255FFF490004AF87 /* MaskProtocol.swift */; }; 15 | BB404A15255FFF490004AF87 /* MaskLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4049FD255FFF490004AF87 /* MaskLayer.swift */; }; 16 | BB404A16255FFF490004AF87 /* MaskingLayerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4049FE255FFF490004AF87 /* MaskingLayerViewModel.swift */; }; 17 | BB404A17255FFF490004AF87 /* SliiderObjectsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB4049FF255FFF490004AF87 /* SliiderObjectsView.xib */; }; 18 | BB404A18255FFF490004AF87 /* SliiderObjectsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A00255FFF490004AF87 /* SliiderObjectsView.swift */; }; 19 | BB404A19255FFF490004AF87 /* MaskGestureViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A01255FFF490004AF87 /* MaskGestureViewModel.swift */; }; 20 | BB404A1B255FFF490004AF87 /* MaskExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A04255FFF490004AF87 /* MaskExtension.swift */; }; 21 | BB404A1C255FFF490004AF87 /* MaskImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A06255FFF490004AF87 /* MaskImagePicker.swift */; }; 22 | BB404A1D255FFF490004AF87 /* MaskGesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A07255FFF490004AF87 /* MaskGesture.swift */; }; 23 | BB404A1F255FFF490004AF87 /* MaskObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A0A255FFF490004AF87 /* MaskObservable.swift */; }; 24 | BB404A20255FFF490004AF87 /* MaskFilterBuiltinsMatte.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A0B255FFF490004AF87 /* MaskFilterBuiltinsMatte.swift */; }; 25 | BB404A21255FFF490004AF87 /* MaskPortraitMatte.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A0C255FFF490004AF87 /* MaskPortraitMatte.swift */; }; 26 | BB404A22255FFF490004AF87 /* PathStruct.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB404A0E255FFF490004AF87 /* PathStruct.swift */; }; 27 | BB49AADB25FC203200BDDFF6 /* MaskingLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49AADA25FC203200BDDFF6 /* MaskingLayerModel.swift */; }; 28 | BB49AADF25FC237300BDDFF6 /* MaskingLayerModelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49AADE25FC237300BDDFF6 /* MaskingLayerModelView.swift */; }; 29 | BB49AAE325FC330500BDDFF6 /* MaskCollectionDelegateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB49AAE225FC330500BDDFF6 /* MaskCollectionDelegateModel.swift */; }; 30 | CC8657BED4A711A2E002C39A00CADB0B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; 31 | E32E9AF962E3FA92A4F3524A3855524C /* Pods-MaskingLayer_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E4D6606D21D1D07F8E0BCD8C72171458 /* Pods-MaskingLayer_Example-dummy.m */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | 7196AF973297C1E23895A2AB0D831283 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = C6FFD8B6FBB6E9CE6F9640FD85E65E42; 40 | remoteInfo = MaskingLayer; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 185A35A75FD2463A6E584A525D2E19BA /* Pods-MaskingLayer_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MaskingLayer_Example-umbrella.h"; sourceTree = ""; }; 46 | 34746A2997C7F5AF425320BD4C890108 /* MaskingLayer.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = MaskingLayer.modulemap; sourceTree = ""; }; 47 | 3AC40FB670BA290F041DF24397E24788 /* MaskingLayer-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MaskingLayer-dummy.m"; sourceTree = ""; }; 48 | 512EB6C26A212A0D94F7BF6CEAF7E820 /* Pods-MaskingLayer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MaskingLayer_Example.release.xcconfig"; sourceTree = ""; }; 49 | 60DF9110994DAD3E0E838B3F0122A715 /* Pods-MaskingLayer_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MaskingLayer_Example-frameworks.sh"; sourceTree = ""; }; 50 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 51 | 736369868F9CE4CCD3AC1643700718B9 /* Pods-MaskingLayer_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MaskingLayer_Example-acknowledgements.plist"; sourceTree = ""; }; 52 | 8B2C1ADD80F2BAF2F7E440832711F8C9 /* Pods-MaskingLayer_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MaskingLayer_Example-Info.plist"; sourceTree = ""; }; 53 | 944F629E29B5C902B098EDCF3B3429EF /* Pods-MaskingLayer_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MaskingLayer_Example-acknowledgements.markdown"; sourceTree = ""; }; 54 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 55 | A27B947A383A77E5E14345AA7D5D885E /* MaskingLayer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MaskingLayer.release.xcconfig; sourceTree = ""; }; 56 | AE66D6A6A57BF253D43B9A5EF9CDD67B /* Pods_MaskingLayer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MaskingLayer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | B5E5106A5425863623B4547A765CE692 /* MaskingLayer-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MaskingLayer-umbrella.h"; sourceTree = ""; }; 58 | B7F0006077B2D64C434D22D0EDF55316 /* MaskingLayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaskingLayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | B9D92244FF4264D39B5EE160EE54C868 /* Pods-MaskingLayer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MaskingLayer_Example.debug.xcconfig"; sourceTree = ""; }; 60 | BA50E910058C8C11CF59642477AF2822 /* MaskingLayer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MaskingLayer.debug.xcconfig; sourceTree = ""; }; 61 | BB4049F8255FFF490004AF87 /* MaskProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskProtocol.swift; sourceTree = ""; }; 62 | BB4049FD255FFF490004AF87 /* MaskLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskLayer.swift; sourceTree = ""; }; 63 | BB4049FE255FFF490004AF87 /* MaskingLayerViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskingLayerViewModel.swift; sourceTree = ""; }; 64 | BB4049FF255FFF490004AF87 /* SliiderObjectsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SliiderObjectsView.xib; sourceTree = ""; }; 65 | BB404A00255FFF490004AF87 /* SliiderObjectsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliiderObjectsView.swift; sourceTree = ""; }; 66 | BB404A01255FFF490004AF87 /* MaskGestureViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskGestureViewModel.swift; sourceTree = ""; }; 67 | BB404A04255FFF490004AF87 /* MaskExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskExtension.swift; sourceTree = ""; }; 68 | BB404A06255FFF490004AF87 /* MaskImagePicker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskImagePicker.swift; sourceTree = ""; }; 69 | BB404A07255FFF490004AF87 /* MaskGesture.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskGesture.swift; sourceTree = ""; }; 70 | BB404A0A255FFF490004AF87 /* MaskObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskObservable.swift; sourceTree = ""; }; 71 | BB404A0B255FFF490004AF87 /* MaskFilterBuiltinsMatte.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskFilterBuiltinsMatte.swift; sourceTree = ""; }; 72 | BB404A0C255FFF490004AF87 /* MaskPortraitMatte.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaskPortraitMatte.swift; sourceTree = ""; }; 73 | BB404A0E255FFF490004AF87 /* PathStruct.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PathStruct.swift; sourceTree = ""; }; 74 | BB49AADA25FC203200BDDFF6 /* MaskingLayerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaskingLayerModel.swift; sourceTree = ""; }; 75 | BB49AADE25FC237300BDDFF6 /* MaskingLayerModelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaskingLayerModelView.swift; sourceTree = ""; }; 76 | BB49AAE225FC330500BDDFF6 /* MaskCollectionDelegateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaskCollectionDelegateModel.swift; sourceTree = ""; }; 77 | BCE0DD8EAE41D73774D59AFB5CFBFD6C /* MaskingLayer-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MaskingLayer-prefix.pch"; sourceTree = ""; }; 78 | C38E1C59A82F31D575FE675FAB15FE2C /* Pods-MaskingLayer_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-MaskingLayer_Example.modulemap"; sourceTree = ""; }; 79 | DA3C61DD352A8AAB4F9FFB7FFA6DAE0A /* MaskingLayer-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "MaskingLayer-Info.plist"; sourceTree = ""; }; 80 | E4D6606D21D1D07F8E0BCD8C72171458 /* Pods-MaskingLayer_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MaskingLayer_Example-dummy.m"; sourceTree = ""; }; 81 | /* End PBXFileReference section */ 82 | 83 | /* Begin PBXFrameworksBuildPhase section */ 84 | 00775B95A77DFA3874BDB54B1E81441D /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | CC8657BED4A711A2E002C39A00CADB0B /* Foundation.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | A94895985D63B29F30D0BF35832B6CF7 /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | 0F486711CE0F9E53026E6607EF994FA3 /* Foundation.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | /* End PBXFrameworksBuildPhase section */ 101 | 102 | /* Begin PBXGroup section */ 103 | 3548C609095E18B5A724D1FC2FD054F4 /* Support Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 34746A2997C7F5AF425320BD4C890108 /* MaskingLayer.modulemap */, 107 | 3AC40FB670BA290F041DF24397E24788 /* MaskingLayer-dummy.m */, 108 | DA3C61DD352A8AAB4F9FFB7FFA6DAE0A /* MaskingLayer-Info.plist */, 109 | BCE0DD8EAE41D73774D59AFB5CFBFD6C /* MaskingLayer-prefix.pch */, 110 | B5E5106A5425863623B4547A765CE692 /* MaskingLayer-umbrella.h */, 111 | BA50E910058C8C11CF59642477AF2822 /* MaskingLayer.debug.xcconfig */, 112 | A27B947A383A77E5E14345AA7D5D885E /* MaskingLayer.release.xcconfig */, 113 | ); 114 | name = "Support Files"; 115 | path = "../Target Support Files/MaskingLayer"; 116 | sourceTree = ""; 117 | }; 118 | 48810A6849338392C7D522D5C8D159E9 /* Targets Support Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | DCC31C8169C887E4B4EAD848BEACB4EC /* Pods-MaskingLayer_Example */, 122 | ); 123 | name = "Targets Support Files"; 124 | sourceTree = ""; 125 | }; 126 | 578452D2E740E91742655AC8F1636D1F /* iOS */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, 130 | ); 131 | name = iOS; 132 | sourceTree = ""; 133 | }; 134 | 73A532C2D322D4E4C3BAF9DF5AC8AE20 /* Pods */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | A59C49481FB5EA3A052B19445C35AC9B /* MaskingLayer */, 138 | ); 139 | name = Pods; 140 | sourceTree = ""; 141 | }; 142 | 9A7744C9759FEDF49B151F73FB7BACFF /* Products */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | B7F0006077B2D64C434D22D0EDF55316 /* MaskingLayer.framework */, 146 | AE66D6A6A57BF253D43B9A5EF9CDD67B /* Pods_MaskingLayer_Example.framework */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | A59C49481FB5EA3A052B19445C35AC9B /* MaskingLayer */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | BB404A03255FFF490004AF87 /* DefalutExtension */, 155 | BB4049F7255FFF490004AF87 /* MaskProtocol */, 156 | BB404A08255FFF490004AF87 /* Model */, 157 | BB404A0D255FFF490004AF87 /* PathStruct */, 158 | BB404A05255FFF490004AF87 /* Util */, 159 | BB404A0F255FFF490004AF87 /* View */, 160 | BB4049FC255FFF490004AF87 /* ViwModel */, 161 | 3548C609095E18B5A724D1FC2FD054F4 /* Support Files */, 162 | ); 163 | path = MaskingLayer; 164 | sourceTree = ""; 165 | }; 166 | BB4049F7255FFF490004AF87 /* MaskProtocol */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | BB4049F8255FFF490004AF87 /* MaskProtocol.swift */, 170 | ); 171 | name = MaskProtocol; 172 | path = Pods/MaskingLayer/Classes/MaskProtocol; 173 | sourceTree = ""; 174 | }; 175 | BB4049FC255FFF490004AF87 /* ViwModel */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | BB4049FD255FFF490004AF87 /* MaskLayer.swift */, 179 | BB4049FE255FFF490004AF87 /* MaskingLayerViewModel.swift */, 180 | BB404A01255FFF490004AF87 /* MaskGestureViewModel.swift */, 181 | ); 182 | name = ViwModel; 183 | path = Pods/MaskingLayer/Classes/ViwModel; 184 | sourceTree = ""; 185 | }; 186 | BB404A03255FFF490004AF87 /* DefalutExtension */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | BB404A04255FFF490004AF87 /* MaskExtension.swift */, 190 | ); 191 | name = DefalutExtension; 192 | path = Pods/MaskingLayer/Classes/DefalutExtension; 193 | sourceTree = ""; 194 | }; 195 | BB404A05255FFF490004AF87 /* Util */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | BB404A06255FFF490004AF87 /* MaskImagePicker.swift */, 199 | BB404A07255FFF490004AF87 /* MaskGesture.swift */, 200 | ); 201 | name = Util; 202 | path = Pods/MaskingLayer/Classes/Util; 203 | sourceTree = ""; 204 | }; 205 | BB404A08255FFF490004AF87 /* Model */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | BB404A0A255FFF490004AF87 /* MaskObservable.swift */, 209 | BB404A0B255FFF490004AF87 /* MaskFilterBuiltinsMatte.swift */, 210 | BB404A0C255FFF490004AF87 /* MaskPortraitMatte.swift */, 211 | BB49AADA25FC203200BDDFF6 /* MaskingLayerModel.swift */, 212 | BB49AAE225FC330500BDDFF6 /* MaskCollectionDelegateModel.swift */, 213 | ); 214 | name = Model; 215 | path = Pods/MaskingLayer/Classes/Model; 216 | sourceTree = ""; 217 | }; 218 | BB404A0D255FFF490004AF87 /* PathStruct */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | BB404A0E255FFF490004AF87 /* PathStruct.swift */, 222 | ); 223 | name = PathStruct; 224 | path = Pods/MaskingLayer/Classes/PathStruct; 225 | sourceTree = ""; 226 | }; 227 | BB404A0F255FFF490004AF87 /* View */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | BB49AADE25FC237300BDDFF6 /* MaskingLayerModelView.swift */, 231 | BB4049FF255FFF490004AF87 /* SliiderObjectsView.xib */, 232 | BB404A00255FFF490004AF87 /* SliiderObjectsView.swift */, 233 | ); 234 | name = View; 235 | path = Pods/MaskingLayer/Classes/View; 236 | sourceTree = ""; 237 | }; 238 | CF1408CF629C7361332E53B88F7BD30C = { 239 | isa = PBXGroup; 240 | children = ( 241 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 242 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, 243 | 73A532C2D322D4E4C3BAF9DF5AC8AE20 /* Pods */, 244 | 9A7744C9759FEDF49B151F73FB7BACFF /* Products */, 245 | 48810A6849338392C7D522D5C8D159E9 /* Targets Support Files */, 246 | ); 247 | sourceTree = ""; 248 | }; 249 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { 250 | isa = PBXGroup; 251 | children = ( 252 | 578452D2E740E91742655AC8F1636D1F /* iOS */, 253 | ); 254 | name = Frameworks; 255 | sourceTree = ""; 256 | }; 257 | DCC31C8169C887E4B4EAD848BEACB4EC /* Pods-MaskingLayer_Example */ = { 258 | isa = PBXGroup; 259 | children = ( 260 | C38E1C59A82F31D575FE675FAB15FE2C /* Pods-MaskingLayer_Example.modulemap */, 261 | 944F629E29B5C902B098EDCF3B3429EF /* Pods-MaskingLayer_Example-acknowledgements.markdown */, 262 | 736369868F9CE4CCD3AC1643700718B9 /* Pods-MaskingLayer_Example-acknowledgements.plist */, 263 | E4D6606D21D1D07F8E0BCD8C72171458 /* Pods-MaskingLayer_Example-dummy.m */, 264 | 60DF9110994DAD3E0E838B3F0122A715 /* Pods-MaskingLayer_Example-frameworks.sh */, 265 | 8B2C1ADD80F2BAF2F7E440832711F8C9 /* Pods-MaskingLayer_Example-Info.plist */, 266 | 185A35A75FD2463A6E584A525D2E19BA /* Pods-MaskingLayer_Example-umbrella.h */, 267 | B9D92244FF4264D39B5EE160EE54C868 /* Pods-MaskingLayer_Example.debug.xcconfig */, 268 | 512EB6C26A212A0D94F7BF6CEAF7E820 /* Pods-MaskingLayer_Example.release.xcconfig */, 269 | ); 270 | name = "Pods-MaskingLayer_Example"; 271 | path = "Target Support Files/Pods-MaskingLayer_Example"; 272 | sourceTree = ""; 273 | }; 274 | /* End PBXGroup section */ 275 | 276 | /* Begin PBXHeadersBuildPhase section */ 277 | 0DD9D76DEE1D60E3656D4A6AF5C05553 /* Headers */ = { 278 | isa = PBXHeadersBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 1EBCBA507A8740A94B643EFDFAFF10F7 /* Pods-MaskingLayer_Example-umbrella.h in Headers */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | AE786048E51C0F975DD94E05845307EB /* Headers */ = { 286 | isa = PBXHeadersBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | 17D2028E1AC4E1A41F78EEA05C067C2C /* MaskingLayer-umbrella.h in Headers */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | /* End PBXHeadersBuildPhase section */ 294 | 295 | /* Begin PBXNativeTarget section */ 296 | 77475B1537E55A46471A555579EAC9E2 /* Pods-MaskingLayer_Example */ = { 297 | isa = PBXNativeTarget; 298 | buildConfigurationList = C9484B96E78BDD80B14CBD658AB1FDC4 /* Build configuration list for PBXNativeTarget "Pods-MaskingLayer_Example" */; 299 | buildPhases = ( 300 | 0DD9D76DEE1D60E3656D4A6AF5C05553 /* Headers */, 301 | FCF1BA1857747342BBE8F34DC1E0C995 /* Sources */, 302 | 00775B95A77DFA3874BDB54B1E81441D /* Frameworks */, 303 | A9B80DADC56C69F432C2BA4921560B83 /* Resources */, 304 | ); 305 | buildRules = ( 306 | ); 307 | dependencies = ( 308 | C38478EC515FCF659C4240D0ABBCFF0A /* PBXTargetDependency */, 309 | ); 310 | name = "Pods-MaskingLayer_Example"; 311 | productName = "Pods-MaskingLayer_Example"; 312 | productReference = AE66D6A6A57BF253D43B9A5EF9CDD67B /* Pods_MaskingLayer_Example.framework */; 313 | productType = "com.apple.product-type.framework"; 314 | }; 315 | C6FFD8B6FBB6E9CE6F9640FD85E65E42 /* MaskingLayer */ = { 316 | isa = PBXNativeTarget; 317 | buildConfigurationList = 52FBF8FFED2AD50D9E322802BBC6B606 /* Build configuration list for PBXNativeTarget "MaskingLayer" */; 318 | buildPhases = ( 319 | AE786048E51C0F975DD94E05845307EB /* Headers */, 320 | 3B9D4E223082BA80E0CD161DF3ED36D1 /* Sources */, 321 | A94895985D63B29F30D0BF35832B6CF7 /* Frameworks */, 322 | DC155C0356FB98530EDCE95AED59C173 /* Resources */, 323 | ); 324 | buildRules = ( 325 | ); 326 | dependencies = ( 327 | ); 328 | name = MaskingLayer; 329 | productName = MaskingLayer; 330 | productReference = B7F0006077B2D64C434D22D0EDF55316 /* MaskingLayer.framework */; 331 | productType = "com.apple.product-type.framework"; 332 | }; 333 | /* End PBXNativeTarget section */ 334 | 335 | /* Begin PBXProject section */ 336 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 337 | isa = PBXProject; 338 | attributes = { 339 | LastSwiftUpdateCheck = 1100; 340 | LastUpgradeCheck = 1220; 341 | }; 342 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 343 | compatibilityVersion = "Xcode 3.2"; 344 | developmentRegion = en; 345 | hasScannedForEncodings = 0; 346 | knownRegions = ( 347 | en, 348 | Base, 349 | ); 350 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 351 | productRefGroup = 9A7744C9759FEDF49B151F73FB7BACFF /* Products */; 352 | projectDirPath = ""; 353 | projectRoot = ""; 354 | targets = ( 355 | C6FFD8B6FBB6E9CE6F9640FD85E65E42 /* MaskingLayer */, 356 | 77475B1537E55A46471A555579EAC9E2 /* Pods-MaskingLayer_Example */, 357 | ); 358 | }; 359 | /* End PBXProject section */ 360 | 361 | /* Begin PBXResourcesBuildPhase section */ 362 | A9B80DADC56C69F432C2BA4921560B83 /* Resources */ = { 363 | isa = PBXResourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | DC155C0356FB98530EDCE95AED59C173 /* Resources */ = { 370 | isa = PBXResourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | BB404A17255FFF490004AF87 /* SliiderObjectsView.xib in Resources */, 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | /* End PBXResourcesBuildPhase section */ 378 | 379 | /* Begin PBXSourcesBuildPhase section */ 380 | 3B9D4E223082BA80E0CD161DF3ED36D1 /* Sources */ = { 381 | isa = PBXSourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | BB404A1B255FFF490004AF87 /* MaskExtension.swift in Sources */, 385 | BB404A19255FFF490004AF87 /* MaskGestureViewModel.swift in Sources */, 386 | BB404A22255FFF490004AF87 /* PathStruct.swift in Sources */, 387 | BB404A16255FFF490004AF87 /* MaskingLayerViewModel.swift in Sources */, 388 | BB404A21255FFF490004AF87 /* MaskPortraitMatte.swift in Sources */, 389 | BB404A20255FFF490004AF87 /* MaskFilterBuiltinsMatte.swift in Sources */, 390 | BB404A18255FFF490004AF87 /* SliiderObjectsView.swift in Sources */, 391 | BB49AAE325FC330500BDDFF6 /* MaskCollectionDelegateModel.swift in Sources */, 392 | BB49AADB25FC203200BDDFF6 /* MaskingLayerModel.swift in Sources */, 393 | 0E6BB75646C89A96232899B76B26EDBD /* MaskingLayer-dummy.m in Sources */, 394 | BB404A1F255FFF490004AF87 /* MaskObservable.swift in Sources */, 395 | BB404A12255FFF490004AF87 /* MaskProtocol.swift in Sources */, 396 | BB404A1D255FFF490004AF87 /* MaskGesture.swift in Sources */, 397 | BB404A1C255FFF490004AF87 /* MaskImagePicker.swift in Sources */, 398 | BB49AADF25FC237300BDDFF6 /* MaskingLayerModelView.swift in Sources */, 399 | BB404A15255FFF490004AF87 /* MaskLayer.swift in Sources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | FCF1BA1857747342BBE8F34DC1E0C995 /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | E32E9AF962E3FA92A4F3524A3855524C /* Pods-MaskingLayer_Example-dummy.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXSourcesBuildPhase section */ 412 | 413 | /* Begin PBXTargetDependency section */ 414 | C38478EC515FCF659C4240D0ABBCFF0A /* PBXTargetDependency */ = { 415 | isa = PBXTargetDependency; 416 | name = MaskingLayer; 417 | target = C6FFD8B6FBB6E9CE6F9640FD85E65E42 /* MaskingLayer */; 418 | targetProxy = 7196AF973297C1E23895A2AB0D831283 /* PBXContainerItemProxy */; 419 | }; 420 | /* End PBXTargetDependency section */ 421 | 422 | /* Begin XCBuildConfiguration section */ 423 | 144565C145A61DFDB696B5984D423043 /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = 512EB6C26A212A0D94F7BF6CEAF7E820 /* Pods-MaskingLayer_Example.release.xcconfig */; 426 | buildSettings = { 427 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 428 | CLANG_ENABLE_OBJC_WEAK = NO; 429 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 431 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 432 | CURRENT_PROJECT_VERSION = 1; 433 | DEFINES_MODULE = YES; 434 | DYLIB_COMPATIBILITY_VERSION = 1; 435 | DYLIB_CURRENT_VERSION = 1; 436 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 437 | INFOPLIST_FILE = "Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-Info.plist"; 438 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 439 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 441 | MACH_O_TYPE = staticlib; 442 | MODULEMAP_FILE = "Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.modulemap"; 443 | OTHER_LDFLAGS = ""; 444 | OTHER_LIBTOOLFLAGS = ""; 445 | PODS_ROOT = "$(SRCROOT)"; 446 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 447 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 448 | SDKROOT = iphoneos; 449 | SKIP_INSTALL = YES; 450 | TARGETED_DEVICE_FAMILY = "1,2"; 451 | VALIDATE_PRODUCT = YES; 452 | VERSIONING_SYSTEM = "apple-generic"; 453 | VERSION_INFO_PREFIX = ""; 454 | }; 455 | name = Release; 456 | }; 457 | 1FBB97E4C0A4B9206AB5EBCE664217A2 /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = B9D92244FF4264D39B5EE160EE54C868 /* Pods-MaskingLayer_Example.debug.xcconfig */; 460 | buildSettings = { 461 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 462 | CLANG_ENABLE_OBJC_WEAK = NO; 463 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 464 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 465 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 466 | CURRENT_PROJECT_VERSION = 1; 467 | DEFINES_MODULE = YES; 468 | DYLIB_COMPATIBILITY_VERSION = 1; 469 | DYLIB_CURRENT_VERSION = 1; 470 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 471 | INFOPLIST_FILE = "Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-Info.plist"; 472 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 473 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 475 | MACH_O_TYPE = staticlib; 476 | MODULEMAP_FILE = "Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.modulemap"; 477 | OTHER_LDFLAGS = ""; 478 | OTHER_LIBTOOLFLAGS = ""; 479 | PODS_ROOT = "$(SRCROOT)"; 480 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 481 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 482 | SDKROOT = iphoneos; 483 | SKIP_INSTALL = YES; 484 | TARGETED_DEVICE_FAMILY = "1,2"; 485 | VERSIONING_SYSTEM = "apple-generic"; 486 | VERSION_INFO_PREFIX = ""; 487 | }; 488 | name = Debug; 489 | }; 490 | 593F10BFFA94DAC7D6E17FB8A7F32D72 /* Release */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | ALWAYS_SEARCH_USER_PATHS = NO; 494 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 495 | CLANG_ANALYZER_NONNULL = YES; 496 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 497 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 498 | CLANG_CXX_LIBRARY = "libc++"; 499 | CLANG_ENABLE_MODULES = YES; 500 | CLANG_ENABLE_OBJC_ARC = YES; 501 | CLANG_ENABLE_OBJC_WEAK = YES; 502 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 503 | CLANG_WARN_BOOL_CONVERSION = YES; 504 | CLANG_WARN_COMMA = YES; 505 | CLANG_WARN_CONSTANT_CONVERSION = YES; 506 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 507 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 508 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 509 | CLANG_WARN_EMPTY_BODY = YES; 510 | CLANG_WARN_ENUM_CONVERSION = YES; 511 | CLANG_WARN_INFINITE_RECURSION = YES; 512 | CLANG_WARN_INT_CONVERSION = YES; 513 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 514 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 515 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 516 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 517 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 518 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 519 | CLANG_WARN_STRICT_PROTOTYPES = YES; 520 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 521 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 522 | CLANG_WARN_UNREACHABLE_CODE = YES; 523 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 524 | COPY_PHASE_STRIP = NO; 525 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 526 | ENABLE_NS_ASSERTIONS = NO; 527 | ENABLE_STRICT_OBJC_MSGSEND = YES; 528 | GCC_C_LANGUAGE_STANDARD = gnu11; 529 | GCC_NO_COMMON_BLOCKS = YES; 530 | GCC_PREPROCESSOR_DEFINITIONS = ( 531 | "POD_CONFIGURATION_RELEASE=1", 532 | "$(inherited)", 533 | ); 534 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 535 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 536 | GCC_WARN_UNDECLARED_SELECTOR = YES; 537 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 538 | GCC_WARN_UNUSED_FUNCTION = YES; 539 | GCC_WARN_UNUSED_VARIABLE = YES; 540 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 541 | MTL_ENABLE_DEBUG_INFO = NO; 542 | MTL_FAST_MATH = YES; 543 | PRODUCT_NAME = "$(TARGET_NAME)"; 544 | STRIP_INSTALLED_PRODUCT = NO; 545 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 546 | SWIFT_VERSION = 5.0; 547 | SYMROOT = "${SRCROOT}/../build"; 548 | }; 549 | name = Release; 550 | }; 551 | 91C2C0B8A708CA8A6DD899B96D19EC93 /* Release */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = A27B947A383A77E5E14345AA7D5D885E /* MaskingLayer.release.xcconfig */; 554 | buildSettings = { 555 | CLANG_ENABLE_OBJC_WEAK = NO; 556 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 557 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 558 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 559 | CURRENT_PROJECT_VERSION = 1; 560 | DEFINES_MODULE = YES; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | GCC_PREFIX_HEADER = "Target Support Files/MaskingLayer/MaskingLayer-prefix.pch"; 565 | INFOPLIST_FILE = "Target Support Files/MaskingLayer/MaskingLayer-Info.plist"; 566 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 567 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 568 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 569 | MODULEMAP_FILE = "Target Support Files/MaskingLayer/MaskingLayer.modulemap"; 570 | PRODUCT_MODULE_NAME = MaskingLayer; 571 | PRODUCT_NAME = MaskingLayer; 572 | SDKROOT = iphoneos; 573 | SKIP_INSTALL = YES; 574 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 575 | SWIFT_VERSION = 5.0; 576 | TARGETED_DEVICE_FAMILY = "1,2"; 577 | VALIDATE_PRODUCT = YES; 578 | VERSIONING_SYSTEM = "apple-generic"; 579 | VERSION_INFO_PREFIX = ""; 580 | }; 581 | name = Release; 582 | }; 583 | 9CF8F83808D0B4426CA57D69B5FD7A54 /* Debug */ = { 584 | isa = XCBuildConfiguration; 585 | baseConfigurationReference = BA50E910058C8C11CF59642477AF2822 /* MaskingLayer.debug.xcconfig */; 586 | buildSettings = { 587 | CLANG_ENABLE_OBJC_WEAK = NO; 588 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 589 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 590 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 591 | CURRENT_PROJECT_VERSION = 1; 592 | DEFINES_MODULE = YES; 593 | DYLIB_COMPATIBILITY_VERSION = 1; 594 | DYLIB_CURRENT_VERSION = 1; 595 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 596 | GCC_PREFIX_HEADER = "Target Support Files/MaskingLayer/MaskingLayer-prefix.pch"; 597 | INFOPLIST_FILE = "Target Support Files/MaskingLayer/MaskingLayer-Info.plist"; 598 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 599 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 600 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 601 | MODULEMAP_FILE = "Target Support Files/MaskingLayer/MaskingLayer.modulemap"; 602 | PRODUCT_MODULE_NAME = MaskingLayer; 603 | PRODUCT_NAME = MaskingLayer; 604 | SDKROOT = iphoneos; 605 | SKIP_INSTALL = YES; 606 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 607 | SWIFT_VERSION = 5.0; 608 | TARGETED_DEVICE_FAMILY = "1,2"; 609 | VERSIONING_SYSTEM = "apple-generic"; 610 | VERSION_INFO_PREFIX = ""; 611 | }; 612 | name = Debug; 613 | }; 614 | A0374B8CF9A7D6A45F6D116D698D1C19 /* Debug */ = { 615 | isa = XCBuildConfiguration; 616 | buildSettings = { 617 | ALWAYS_SEARCH_USER_PATHS = NO; 618 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 619 | CLANG_ANALYZER_NONNULL = YES; 620 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 621 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 622 | CLANG_CXX_LIBRARY = "libc++"; 623 | CLANG_ENABLE_MODULES = YES; 624 | CLANG_ENABLE_OBJC_ARC = YES; 625 | CLANG_ENABLE_OBJC_WEAK = YES; 626 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 627 | CLANG_WARN_BOOL_CONVERSION = YES; 628 | CLANG_WARN_COMMA = YES; 629 | CLANG_WARN_CONSTANT_CONVERSION = YES; 630 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 631 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 632 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 633 | CLANG_WARN_EMPTY_BODY = YES; 634 | CLANG_WARN_ENUM_CONVERSION = YES; 635 | CLANG_WARN_INFINITE_RECURSION = YES; 636 | CLANG_WARN_INT_CONVERSION = YES; 637 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 638 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 639 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 640 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 641 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 642 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 643 | CLANG_WARN_STRICT_PROTOTYPES = YES; 644 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 645 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 646 | CLANG_WARN_UNREACHABLE_CODE = YES; 647 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 648 | COPY_PHASE_STRIP = NO; 649 | DEBUG_INFORMATION_FORMAT = dwarf; 650 | ENABLE_STRICT_OBJC_MSGSEND = YES; 651 | ENABLE_TESTABILITY = YES; 652 | GCC_C_LANGUAGE_STANDARD = gnu11; 653 | GCC_DYNAMIC_NO_PIC = NO; 654 | GCC_NO_COMMON_BLOCKS = YES; 655 | GCC_OPTIMIZATION_LEVEL = 0; 656 | GCC_PREPROCESSOR_DEFINITIONS = ( 657 | "POD_CONFIGURATION_DEBUG=1", 658 | "DEBUG=1", 659 | "$(inherited)", 660 | ); 661 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 662 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 663 | GCC_WARN_UNDECLARED_SELECTOR = YES; 664 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 665 | GCC_WARN_UNUSED_FUNCTION = YES; 666 | GCC_WARN_UNUSED_VARIABLE = YES; 667 | IPHONEOS_DEPLOYMENT_TARGET = 14.2; 668 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 669 | MTL_FAST_MATH = YES; 670 | ONLY_ACTIVE_ARCH = YES; 671 | PRODUCT_NAME = "$(TARGET_NAME)"; 672 | STRIP_INSTALLED_PRODUCT = NO; 673 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 674 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 675 | SWIFT_VERSION = 5.0; 676 | SYMROOT = "${SRCROOT}/../build"; 677 | }; 678 | name = Debug; 679 | }; 680 | /* End XCBuildConfiguration section */ 681 | 682 | /* Begin XCConfigurationList section */ 683 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 684 | isa = XCConfigurationList; 685 | buildConfigurations = ( 686 | A0374B8CF9A7D6A45F6D116D698D1C19 /* Debug */, 687 | 593F10BFFA94DAC7D6E17FB8A7F32D72 /* Release */, 688 | ); 689 | defaultConfigurationIsVisible = 0; 690 | defaultConfigurationName = Release; 691 | }; 692 | 52FBF8FFED2AD50D9E322802BBC6B606 /* Build configuration list for PBXNativeTarget "MaskingLayer" */ = { 693 | isa = XCConfigurationList; 694 | buildConfigurations = ( 695 | 9CF8F83808D0B4426CA57D69B5FD7A54 /* Debug */, 696 | 91C2C0B8A708CA8A6DD899B96D19EC93 /* Release */, 697 | ); 698 | defaultConfigurationIsVisible = 0; 699 | defaultConfigurationName = Release; 700 | }; 701 | C9484B96E78BDD80B14CBD658AB1FDC4 /* Build configuration list for PBXNativeTarget "Pods-MaskingLayer_Example" */ = { 702 | isa = XCConfigurationList; 703 | buildConfigurations = ( 704 | 1FBB97E4C0A4B9206AB5EBCE664217A2 /* Debug */, 705 | 144565C145A61DFDB696B5984D423043 /* Release */, 706 | ); 707 | defaultConfigurationIsVisible = 0; 708 | defaultConfigurationName = Release; 709 | }; 710 | /* End XCConfigurationList section */ 711 | }; 712 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 713 | } 714 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MaskingLayer : NSObject 3 | @end 4 | @implementation PodsDummy_MaskingLayer 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double MaskingLayerVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char MaskingLayerVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MaskingLayer 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer.modulemap: -------------------------------------------------------------------------------- 1 | framework module MaskingLayer { 2 | umbrella header "MaskingLayer-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MaskingLayer/MaskingLayer.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MaskingLayer 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MaskingLayer 5 | 6 | Copyright (c) 2018 daisukenagata 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2018 daisukenagata <dbank0208@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | MaskingLayer 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MaskingLayer_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MaskingLayer_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | BCSYMBOLMAP_DIR="BCSymbolMaps" 23 | 24 | 25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 28 | 29 | # Copies and strips a vendored framework 30 | install_framework() 31 | { 32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 33 | local source="${BUILT_PRODUCTS_DIR}/$1" 34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 36 | elif [ -r "$1" ]; then 37 | local source="$1" 38 | fi 39 | 40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 41 | 42 | if [ -L "${source}" ]; then 43 | echo "Symlinked..." 44 | source="$(readlink "${source}")" 45 | fi 46 | 47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then 48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied 49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do 50 | echo "Installing $f" 51 | install_bcsymbolmap "$f" "$destination" 52 | rm "$f" 53 | done 54 | rmdir "${source}/${BCSYMBOLMAP_DIR}" 55 | fi 56 | 57 | # Use filter instead of exclude so missing patterns don't throw errors. 58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 60 | 61 | local basename 62 | basename="$(basename -s .framework "$1")" 63 | binary="${destination}/${basename}.framework/${basename}" 64 | 65 | if ! [ -r "$binary" ]; then 66 | binary="${destination}/${basename}" 67 | elif [ -L "${binary}" ]; then 68 | echo "Destination binary is symlinked..." 69 | dirname="$(dirname "${binary}")" 70 | binary="${dirname}/$(readlink "${binary}")" 71 | fi 72 | 73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 75 | strip_invalid_archs "$binary" 76 | fi 77 | 78 | # Resign the code if required by the build settings to avoid unstable apps 79 | code_sign_if_enabled "${destination}/$(basename "$1")" 80 | 81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 83 | local swift_runtime_libs 84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 85 | for lib in $swift_runtime_libs; do 86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 88 | code_sign_if_enabled "${destination}/${lib}" 89 | done 90 | fi 91 | } 92 | # Copies and strips a vendored dSYM 93 | install_dsym() { 94 | local source="$1" 95 | warn_missing_arch=${2:-true} 96 | if [ -r "$source" ]; then 97 | # Copy the dSYM into the targets temp dir. 98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 100 | 101 | local basename 102 | basename="$(basename -s .dSYM "$source")" 103 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 105 | 106 | # Strip invalid architectures from the dSYM. 107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 108 | strip_invalid_archs "$binary" "$warn_missing_arch" 109 | fi 110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then 111 | # Move the stripped file into its final destination. 112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 114 | else 115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 116 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 117 | fi 118 | fi 119 | } 120 | 121 | # Used as a return value for each invocation of `strip_invalid_archs` function. 122 | STRIP_BINARY_RETVAL=0 123 | 124 | # Strip invalid architectures 125 | strip_invalid_archs() { 126 | binary="$1" 127 | warn_missing_arch=${2:-true} 128 | # Get architectures for current target binary 129 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 130 | # Intersect them with the architectures we are building for 131 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 132 | # If there are no archs supported by this binary then warn the user 133 | if [[ -z "$intersected_archs" ]]; then 134 | if [[ "$warn_missing_arch" == "true" ]]; then 135 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 136 | fi 137 | STRIP_BINARY_RETVAL=1 138 | return 139 | fi 140 | stripped="" 141 | for arch in $binary_archs; do 142 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 143 | # Strip non-valid architectures in-place 144 | lipo -remove "$arch" -output "$binary" "$binary" 145 | stripped="$stripped $arch" 146 | fi 147 | done 148 | if [[ "$stripped" ]]; then 149 | echo "Stripped $binary of architectures:$stripped" 150 | fi 151 | STRIP_BINARY_RETVAL=0 152 | } 153 | 154 | # Copies the bcsymbolmap files of a vendored framework 155 | install_bcsymbolmap() { 156 | local bcsymbolmap_path="$1" 157 | local destination="${BUILT_PRODUCTS_DIR}" 158 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 159 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 160 | } 161 | 162 | # Signs a framework with the provided identity 163 | code_sign_if_enabled() { 164 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 165 | # Use the current code_sign_identity 166 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 167 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 168 | 169 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 170 | code_sign_cmd="$code_sign_cmd &" 171 | fi 172 | echo "$code_sign_cmd" 173 | eval "$code_sign_cmd" 174 | fi 175 | } 176 | 177 | if [[ "$CONFIGURATION" == "Debug" ]]; then 178 | install_framework "${BUILT_PRODUCTS_DIR}/MaskingLayer/MaskingLayer.framework" 179 | fi 180 | if [[ "$CONFIGURATION" == "Release" ]]; then 181 | install_framework "${BUILT_PRODUCTS_DIR}/MaskingLayer/MaskingLayer.framework" 182 | fi 183 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 184 | wait 185 | fi 186 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_MaskingLayer_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_MaskingLayer_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer/MaskingLayer.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | OTHER_LDFLAGS = $(inherited) -framework "MaskingLayer" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_MaskingLayer_Example { 2 | umbrella header "Pods-MaskingLayer_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MaskingLayer_Example/Pods-MaskingLayer_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MaskingLayer/MaskingLayer.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | OTHER_LDFLAGS = $(inherited) -framework "MaskingLayer" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | // https://github.com/Quick/Quick 2 | 3 | import Quick 4 | import Nimble 5 | import MaskingLayer 6 | 7 | class TableOfContentsSpec: QuickSpec { 8 | override func spec() { 9 | describe("these will fail") { 10 | 11 | it("can do maths") { 12 | expect(1) == 2 13 | } 14 | 15 | it("can read") { 16 | expect("number") == "string" 17 | } 18 | 19 | it("will eventually fail") { 20 | expect("time").toEventually( equal("done") ) 21 | } 22 | 23 | context("these will pass") { 24 | 25 | it("can do maths") { 26 | expect(23) == 23 27 | } 28 | 29 | it("can read") { 30 | expect("🐮") == "🐮" 31 | } 32 | 33 | it("will eventually pass") { 34 | var time = "passing" 35 | 36 | DispatchQueue.main.async { 37 | time = "done" 38 | } 39 | 40 | waitUntil { done in 41 | Thread.sleep(forTimeInterval: 0.5) 42 | expect(time) == "done" 43 | 44 | done() 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 daisukenagata 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /MaskImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaisukeNagata/MaskingLayer/97dbd85b7c12e413fbacc2be635e106a58f2e099/MaskImage.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MaskingLayer 2 | 3 | os 14.4 ~ iPhoneX ~ 4 | 5 | 6 | [![Version](https://img.shields.io/cocoapods/v/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 7 | [![License](https://img.shields.io/cocoapods/l/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 8 | [![Platform](https://img.shields.io/cocoapods/p/MaskingLayer.svg?style=flat)](https://cocoapods.org/pods/MaskingLayer) 9 | 10 | ## Example 11 | ``` 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | Alert button function on the left side of the navigation bar 14 | Camera roll, video roll, mask camera, trim UI, hair color change, clear 15 | 16 | Version 2.0.0 17 | I created a trim UI for the alert button on the left side of the navigation bar. 18 | You can select a trim from the alert and trace the image to select the trim range. 19 | If you want to adjust the height of the mask range, long tap and scroll up and down to expand the selection range up and down. 20 | Added the function to actually trim. 21 | ``` 22 | 23 | ## Version 0.8 ~ 24 | 25 | The left is the latest version. Perform a smooth crop. 26 | ![](https://user-images.githubusercontent.com/16457165/63633553-2ed26080-c685-11e9-8c91-17e3eb36dc3f.gif) 27 | 28 | ## Version 1.0.0 ~ 29 | ![](https://user-images.githubusercontent.com/16457165/78512413-3c38f700-77df-11ea-97cc-ff506ae46941.gif) 30 | 31 | ## Version 2.2.0 ~ 32 |

33 | 34 |

35 | 36 | ## Version 2.3.0 ~ 37 |

38 | 39 |

40 | 41 | ## Version 2.3.7~ 42 | trimsize true or false is scale change 43 | https://github.com/daisukenagata/MaskingLayer/blob/master/Example/MaskingLayer/ViewController.swift#L32 44 | 45 | ## Installation 46 | 47 | MaskingLayer is available through [CocoaPods](https://cocoapods.org). To install 48 | it, simply add the following line to your Podfile: 49 | 50 | ``` 51 | pod 'MaskingLayer' 52 | ``` 53 | 54 | ## Author 55 | 56 | daisukenagata, dbank0208@gmail.com 57 | 58 | ## License 59 | 60 | MaskingLayer is available under the MIT license. See the LICENSE file for more info. 61 | 62 | 63 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------