├── .DS_Store
├── README.md
├── SwiftyPhotoClipper
├── SwiftyPhotoClipper.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── SwiftyPhotoClipper
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
│ ├── AppDelegate.swift
│ ├── ViewController.swift
│ └── SwiftyPhotoClipper.swift
├── LICENSE
└── .gitignore
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KFCFans/SwiftyPhotoClipper/HEAD/.DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftyPhotoClipper
2 | A PhotoClipper by swift3
3 |
4 | ##UIImagePickerController 选取图片后自定义剪切器
5 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 LoveAlwaysYoung
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/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 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 | 同意
25 | NSPhotoLibraryUsageDescription
26 | 同意
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | ## Playgrounds
31 | timeline.xctimeline
32 | playground.xcworkspace
33 |
34 | # Swift Package Manager
35 | #
36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
37 | # Packages/
38 | .build/
39 |
40 | # CocoaPods
41 | #
42 | # We recommend against adding the Pods directory to your .gitignore. However
43 | # you should judge for yourself, the pros and cons are mentioned at:
44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
45 | #
46 | # Pods/
47 |
48 | # Carthage
49 | #
50 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
51 | # Carthage/Checkouts
52 |
53 | Carthage/Build
54 |
55 | # fastlane
56 | #
57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
58 | # screenshots whenever they are needed.
59 | # For more information about the recommended setup visit:
60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
61 |
62 | fastlane/report.xml
63 | fastlane/Preview.html
64 | fastlane/screenshots
65 | fastlane/test_output
66 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/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 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftyPhotoClipper
4 | //
5 | // Created by lip on 17/4/4.
6 | // Copyright © 2017年 lip. 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: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SwiftyPhotoClipper
4 | //
5 | // Created by lip on 17/4/4.
6 | // Copyright © 2017年 lip. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 |
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | view.backgroundColor = UIColor.darkGray
19 |
20 | let photoBtn = UIButton(frame: CGRect(x: 10, y: 100, width: 100, height: 20))
21 | photoBtn.setTitle("相册中选择", for: .normal)
22 | photoBtn.addTarget(nil, action: #selector(photoBtnIsClicked), for: .touchUpInside)
23 |
24 | let cameraBtn = UIButton(frame: CGRect(x: 10, y: 200, width: 100, height: 20))
25 | cameraBtn.setTitle("拍照", for: .normal)
26 | cameraBtn.addTarget(nil, action: #selector(camerBtnIsClicked), for: .touchUpInside)
27 |
28 | view.addSubview(photoBtn)
29 | view.addSubview(cameraBtn)
30 |
31 | }
32 |
33 | @objc private func photoBtnIsClicked(){
34 | //判断设置是否支持图片库
35 | if UIImagePickerController.isSourceTypeAvailable(.photoLibrary){
36 | //初始化图片控制器
37 | let picker = UIImagePickerController()
38 | //设置代理
39 | picker.delegate = self
40 | //指定图片控制器类型
41 | picker.sourceType = UIImagePickerControllerSourceType.photoLibrary
42 |
43 | //弹出控制器,显示界面
44 | self.present(picker, animated: true, completion: nil)
45 | }
46 |
47 | }
48 |
49 | @objc private func camerBtnIsClicked(){
50 | if UIImagePickerController.isSourceTypeAvailable(.camera){
51 | //初始化图片控制器
52 | let picker = UIImagePickerController()
53 | //设置代理
54 | picker.delegate = self
55 | //指定图片控制器类型
56 | picker.sourceType = UIImagePickerControllerSourceType.camera
57 | //弹出控制器,显示界面
58 | self.present(picker, animated: true, completion: nil)
59 | }
60 |
61 | }
62 |
63 | override func didReceiveMemoryWarning() {
64 | super.didReceiveMemoryWarning()
65 | // Dispose of any resources that can be recreated.
66 | }
67 |
68 | }
69 |
70 | extension ViewController:UIImagePickerControllerDelegate,UINavigationControllerDelegate,SwiftyPhotoClipperDelegate{
71 | //选择图片成功后代理
72 | func imagePickerController(_ picker: UIImagePickerController,didFinishPickingMediaWithInfo info: [String : Any]) {
73 | if let image = info[UIImagePickerControllerOriginalImage] as? UIImage {
74 |
75 |
76 | picker.dismiss(animated: false, completion: {
77 | let clipper = SwiftyPhotoClipper()
78 | clipper.delegate = self
79 | clipper.img = image
80 | self.present(clipper, animated: true, completion: nil)
81 | })
82 |
83 |
84 | } else{
85 | print("Something went wrong")
86 | }
87 | }
88 |
89 | func didFinishClippingPhoto(image: UIImage) {
90 |
91 | let imgv = UIImageView(frame: CGRect(x: 0, y: 300, width: UIScreen.main.bounds.width, height: 200))
92 | imgv.image = image
93 |
94 | view.addSubview(imgv)
95 | }
96 |
97 | }
98 |
99 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper/SwiftyPhotoClipper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyPhotoClipper.swift
3 | // SwiftyPhotoClipper
4 | //
5 | // Created by lip on 17/4/4.
6 | // Copyright © 2017年 lip. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | //
12 | // UIClipController.swift
13 | // Temple
14 | //
15 | // Created by lip on 17/4/4.
16 | // Copyright © 2017年 lip. All rights reserved.
17 | //
18 |
19 | import UIKit
20 |
21 | protocol SwiftyPhotoClipperDelegate {
22 |
23 | func didFinishClippingPhoto(image:UIImage)
24 | }
25 |
26 | class SwiftyPhotoClipper: UIViewController {
27 |
28 | // 代理
29 | var delegate:SwiftyPhotoClipperDelegate?
30 |
31 | var imgView:UIImageView?
32 |
33 | var img:UIImage?
34 | let scrollview = UIScrollView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
35 |
36 | var maxScale:CGFloat = 3.0
37 | var minScale:CGFloat = 1.0
38 |
39 | // 屏幕
40 | let HEIGHT = UIScreen.main.bounds.height
41 | let WIDTH = UIScreen.main.bounds.width
42 |
43 | // 截图大小
44 | var selectWidth:CGFloat = UIScreen.main.bounds.width
45 | var selectHeight:CGFloat = 200.0
46 |
47 | // 框框线的宽度
48 | let lineWidth:CGFloat = 1.0
49 |
50 | override func viewDidLoad() {
51 | super.viewDidLoad()
52 |
53 |
54 | }
55 |
56 | override func viewWillAppear(_ animated: Bool) {
57 | setupUI()
58 | drawTheRect()
59 | }
60 |
61 |
62 |
63 | override func didReceiveMemoryWarning() {
64 | super.didReceiveMemoryWarning()
65 | // Dispose of any resources that can be recreated.
66 | }
67 |
68 | /// 设置图片
69 | func setImageView(image:UIImage){
70 | imgView = UIImageView(image: image)
71 | }
72 |
73 | /// 设置裁切区域
74 | func setClipSize(width:CGFloat,height:CGFloat){
75 |
76 | self.selectHeight = height
77 | self.selectWidth = width
78 | }
79 |
80 |
81 |
82 | }
83 |
84 | // MARK: - UI
85 | extension SwiftyPhotoClipper{
86 |
87 | fileprivate func setupUI(){
88 |
89 | scrollview.backgroundColor = UIColor.black
90 |
91 | imgView = UIImageView(image: img)
92 |
93 | guard let imgView = imgView else {
94 | return
95 | }
96 | view.backgroundColor = UIColor.white
97 | imgView.contentMode = .scaleToFill
98 | scrollview.delegate = self
99 | imgView.center = scrollview.center
100 |
101 | if imgView.bounds.width > WIDTH {
102 | imgView.frame.size = CGSize(width: WIDTH, height: imgView.bounds.height / imgView.bounds.width * WIDTH)
103 | imgView.center = scrollview.center
104 | }
105 | if imgView.bounds.height > HEIGHT{
106 | imgView.frame.size = CGSize(width: HEIGHT, height: imgView.bounds.width / imgView.bounds.height * HEIGHT)
107 | imgView.center = scrollview.center
108 | }
109 |
110 | view.addSubview(scrollview)
111 | scrollview.addSubview(imgView)
112 |
113 | let topInsert = (imgView.frame.size.height - selectHeight)/2
114 | let bottomInsert = (HEIGHT - imgView.frame.size.height)/2
115 |
116 | scrollview.contentSize = CGSize(width: WIDTH, height: HEIGHT + imgView.frame.height / 2)
117 | scrollview.contentInset = UIEdgeInsets(top: topInsert, left: 0, bottom: -bottomInsert, right: 0)
118 |
119 | // 隐藏导航条
120 | scrollview.showsHorizontalScrollIndicator = false
121 | scrollview.showsVerticalScrollIndicator = false
122 |
123 | // 设置缩放属性
124 | scrollview.maximumZoomScale = maxScale
125 | scrollview.minimumZoomScale = minScale
126 |
127 | // 设置按钮
128 |
129 | let cancelBtn = UIButton(frame: CGRect(x: 10, y: HEIGHT - 50, width: 100, height: 40))
130 | cancelBtn.setTitle("取消", for: .normal)
131 | cancelBtn.addTarget(nil, action: #selector(cancelBtnIsClicked), for: .touchUpInside)
132 | view.addSubview(cancelBtn)
133 |
134 | let okBtn = UIButton(frame: CGRect(x: WIDTH - 110, y: HEIGHT - 50, width: 100, height: 40))
135 | okBtn.contentMode = .right
136 | okBtn.setTitle("选取", for: .normal)
137 | okBtn.addTarget(nil, action: #selector(okBtnIsClicked), for: .touchUpInside)
138 | view.addSubview(okBtn)
139 |
140 |
141 |
142 | }
143 |
144 | fileprivate func clipImage()->UIImage?{
145 |
146 | let rect = UIScreen.main.bounds
147 |
148 | // 记录屏幕缩放比
149 | let scal = UIScreen.main.scale
150 |
151 | // 上下文
152 | UIGraphicsBeginImageContextWithOptions(rect.size, true, 0)
153 |
154 | let context = UIGraphicsGetCurrentContext()
155 |
156 | UIApplication.shared.keyWindow?.layer.render(in: context!)
157 |
158 | // 截全屏
159 | guard let img = UIGraphicsGetImageFromCurrentImageContext()?.cgImage,
160 | let result = img.cropping(to: CGRect(x: scal * lineWidth, y: (HEIGHT - selectHeight)/2 * scal, width: (self.WIDTH - 2*lineWidth) * scal, height: selectHeight * scal)) else{
161 | return nil
162 | }
163 | // 关闭上下文
164 | UIGraphicsEndImageContext()
165 |
166 | return UIImage(cgImage: result, scale: scal, orientation: .up)
167 |
168 | }
169 |
170 |
171 | /// 绘制选择框
172 | fileprivate func drawTheRect(){
173 |
174 |
175 | // 获取上下文 size表示图片大小 false表示透明 0表示自动适配屏幕大小
176 | UIGraphicsBeginImageContextWithOptions(UIScreen.main.bounds.size, false, 0)
177 |
178 | let context = UIGraphicsGetCurrentContext()
179 | context?.setFillColor(UIColor.init(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor)
180 | context?.fill(UIScreen.main.bounds)
181 | context?.addRect(CGRect(x: 0, y: (HEIGHT - selectHeight)/2, width: WIDTH , height: selectHeight))
182 | context?.setBlendMode(.clear)
183 | context?.fillPath()
184 |
185 | // 绘制框框
186 | context?.setBlendMode(.color)
187 | context?.setStrokeColor(UIColor.white.cgColor)
188 | context?.setLineWidth(1.0)
189 | context?.stroke(CGRect(x: 0, y: (HEIGHT - selectHeight)/2 - lineWidth , width: WIDTH , height: selectHeight + 2*lineWidth))
190 | context?.strokePath()
191 |
192 |
193 | let img = UIGraphicsGetImageFromCurrentImageContext()
194 | UIGraphicsEndImageContext()
195 |
196 | let selectarea = UIImageView(image: img)
197 | selectarea.frame.origin = CGPoint(x: 0, y: 0)
198 | view.addSubview(selectarea)
199 |
200 |
201 | }
202 |
203 | }
204 |
205 | // MARK: - 代理方法
206 | extension SwiftyPhotoClipper:UIScrollViewDelegate{
207 |
208 | func scrollViewDidZoom(_ scrollView: UIScrollView) {
209 |
210 | //当捏或移动时,需要对center重新定义以达到正确显示位置
211 | var centerX = scrollView.center.x
212 | var centerY = scrollView.center.y
213 | centerX = scrollView.contentSize.width > scrollView.frame.size.width ? scrollView.contentSize.width / 2 : centerX
214 | centerY = scrollView.contentSize.height > scrollView.frame.size.height ?scrollView.contentSize.height / 2 : centerY
215 | self.imgView?.center = CGPoint(x: centerX, y: centerY)
216 |
217 | guard let imgView = imgView else {
218 | return
219 | }
220 |
221 | let topInsert = (imgView.frame.size.height - selectHeight)/2
222 | let bottomInsert = (HEIGHT - imgView.frame.size.height)/2
223 | scrollview.contentSize = CGSize(width: imgView.frame.width, height: HEIGHT + imgView.frame.height / 2)
224 | scrollview.contentInset = UIEdgeInsets(top: topInsert, left: 0, bottom: -bottomInsert, right: 0)
225 |
226 | }
227 |
228 | func viewForZooming(in scrollView: UIScrollView) -> UIView? {
229 | return self.imgView
230 | }
231 |
232 | }
233 |
234 | // MARK: - 监听
235 | extension SwiftyPhotoClipper{
236 |
237 | @objc fileprivate func cancelBtnIsClicked(){
238 | dismiss(animated: true, completion: nil)
239 | }
240 |
241 | @objc fileprivate func okBtnIsClicked(){
242 | let result = clipImage() ?? UIImage()
243 | delegate?.didFinishClippingPhoto(image: result)
244 | dismiss(animated: true, completion: nil)
245 |
246 | }
247 |
248 | }
249 |
--------------------------------------------------------------------------------
/SwiftyPhotoClipper/SwiftyPhotoClipper.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 36E27ED41E93E0E000C4F7DA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E27ED31E93E0E000C4F7DA /* AppDelegate.swift */; };
11 | 36E27ED61E93E0E000C4F7DA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E27ED51E93E0E000C4F7DA /* ViewController.swift */; };
12 | 36E27ED91E93E0E000C4F7DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 36E27ED71E93E0E000C4F7DA /* Main.storyboard */; };
13 | 36E27EDB1E93E0E000C4F7DA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 36E27EDA1E93E0E000C4F7DA /* Assets.xcassets */; };
14 | 36E27EDE1E93E0E000C4F7DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 36E27EDC1E93E0E000C4F7DA /* LaunchScreen.storyboard */; };
15 | 36E27EE61E93E11A00C4F7DA /* SwiftyPhotoClipper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E27EE51E93E11A00C4F7DA /* SwiftyPhotoClipper.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 36E27ED01E93E0E000C4F7DA /* SwiftyPhotoClipper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyPhotoClipper.app; sourceTree = BUILT_PRODUCTS_DIR; };
20 | 36E27ED31E93E0E000C4F7DA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
21 | 36E27ED51E93E0E000C4F7DA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
22 | 36E27ED81E93E0E000C4F7DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
23 | 36E27EDA1E93E0E000C4F7DA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
24 | 36E27EDD1E93E0E000C4F7DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
25 | 36E27EDF1E93E0E000C4F7DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
26 | 36E27EE51E93E11A00C4F7DA /* SwiftyPhotoClipper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyPhotoClipper.swift; sourceTree = ""; };
27 | /* End PBXFileReference section */
28 |
29 | /* Begin PBXFrameworksBuildPhase section */
30 | 36E27ECD1E93E0E000C4F7DA /* Frameworks */ = {
31 | isa = PBXFrameworksBuildPhase;
32 | buildActionMask = 2147483647;
33 | files = (
34 | );
35 | runOnlyForDeploymentPostprocessing = 0;
36 | };
37 | /* End PBXFrameworksBuildPhase section */
38 |
39 | /* Begin PBXGroup section */
40 | 36E27EC71E93E0E000C4F7DA = {
41 | isa = PBXGroup;
42 | children = (
43 | 36E27ED21E93E0E000C4F7DA /* SwiftyPhotoClipper */,
44 | 36E27ED11E93E0E000C4F7DA /* Products */,
45 | );
46 | sourceTree = "";
47 | };
48 | 36E27ED11E93E0E000C4F7DA /* Products */ = {
49 | isa = PBXGroup;
50 | children = (
51 | 36E27ED01E93E0E000C4F7DA /* SwiftyPhotoClipper.app */,
52 | );
53 | name = Products;
54 | sourceTree = "";
55 | };
56 | 36E27ED21E93E0E000C4F7DA /* SwiftyPhotoClipper */ = {
57 | isa = PBXGroup;
58 | children = (
59 | 36E27ED31E93E0E000C4F7DA /* AppDelegate.swift */,
60 | 36E27ED51E93E0E000C4F7DA /* ViewController.swift */,
61 | 36E27ED71E93E0E000C4F7DA /* Main.storyboard */,
62 | 36E27EDA1E93E0E000C4F7DA /* Assets.xcassets */,
63 | 36E27EDC1E93E0E000C4F7DA /* LaunchScreen.storyboard */,
64 | 36E27EDF1E93E0E000C4F7DA /* Info.plist */,
65 | 36E27EE51E93E11A00C4F7DA /* SwiftyPhotoClipper.swift */,
66 | );
67 | path = SwiftyPhotoClipper;
68 | sourceTree = "";
69 | };
70 | /* End PBXGroup section */
71 |
72 | /* Begin PBXNativeTarget section */
73 | 36E27ECF1E93E0E000C4F7DA /* SwiftyPhotoClipper */ = {
74 | isa = PBXNativeTarget;
75 | buildConfigurationList = 36E27EE21E93E0E000C4F7DA /* Build configuration list for PBXNativeTarget "SwiftyPhotoClipper" */;
76 | buildPhases = (
77 | 36E27ECC1E93E0E000C4F7DA /* Sources */,
78 | 36E27ECD1E93E0E000C4F7DA /* Frameworks */,
79 | 36E27ECE1E93E0E000C4F7DA /* Resources */,
80 | );
81 | buildRules = (
82 | );
83 | dependencies = (
84 | );
85 | name = SwiftyPhotoClipper;
86 | productName = SwiftyPhotoClipper;
87 | productReference = 36E27ED01E93E0E000C4F7DA /* SwiftyPhotoClipper.app */;
88 | productType = "com.apple.product-type.application";
89 | };
90 | /* End PBXNativeTarget section */
91 |
92 | /* Begin PBXProject section */
93 | 36E27EC81E93E0E000C4F7DA /* Project object */ = {
94 | isa = PBXProject;
95 | attributes = {
96 | LastSwiftUpdateCheck = 0820;
97 | LastUpgradeCheck = 0820;
98 | ORGANIZATIONNAME = lip;
99 | TargetAttributes = {
100 | 36E27ECF1E93E0E000C4F7DA = {
101 | CreatedOnToolsVersion = 8.2.1;
102 | DevelopmentTeam = 7PZ7W7SYEE;
103 | ProvisioningStyle = Automatic;
104 | };
105 | };
106 | };
107 | buildConfigurationList = 36E27ECB1E93E0E000C4F7DA /* Build configuration list for PBXProject "SwiftyPhotoClipper" */;
108 | compatibilityVersion = "Xcode 3.2";
109 | developmentRegion = English;
110 | hasScannedForEncodings = 0;
111 | knownRegions = (
112 | en,
113 | Base,
114 | );
115 | mainGroup = 36E27EC71E93E0E000C4F7DA;
116 | productRefGroup = 36E27ED11E93E0E000C4F7DA /* Products */;
117 | projectDirPath = "";
118 | projectRoot = "";
119 | targets = (
120 | 36E27ECF1E93E0E000C4F7DA /* SwiftyPhotoClipper */,
121 | );
122 | };
123 | /* End PBXProject section */
124 |
125 | /* Begin PBXResourcesBuildPhase section */
126 | 36E27ECE1E93E0E000C4F7DA /* Resources */ = {
127 | isa = PBXResourcesBuildPhase;
128 | buildActionMask = 2147483647;
129 | files = (
130 | 36E27EDE1E93E0E000C4F7DA /* LaunchScreen.storyboard in Resources */,
131 | 36E27EDB1E93E0E000C4F7DA /* Assets.xcassets in Resources */,
132 | 36E27ED91E93E0E000C4F7DA /* Main.storyboard in Resources */,
133 | );
134 | runOnlyForDeploymentPostprocessing = 0;
135 | };
136 | /* End PBXResourcesBuildPhase section */
137 |
138 | /* Begin PBXSourcesBuildPhase section */
139 | 36E27ECC1E93E0E000C4F7DA /* Sources */ = {
140 | isa = PBXSourcesBuildPhase;
141 | buildActionMask = 2147483647;
142 | files = (
143 | 36E27ED61E93E0E000C4F7DA /* ViewController.swift in Sources */,
144 | 36E27ED41E93E0E000C4F7DA /* AppDelegate.swift in Sources */,
145 | 36E27EE61E93E11A00C4F7DA /* SwiftyPhotoClipper.swift in Sources */,
146 | );
147 | runOnlyForDeploymentPostprocessing = 0;
148 | };
149 | /* End PBXSourcesBuildPhase section */
150 |
151 | /* Begin PBXVariantGroup section */
152 | 36E27ED71E93E0E000C4F7DA /* Main.storyboard */ = {
153 | isa = PBXVariantGroup;
154 | children = (
155 | 36E27ED81E93E0E000C4F7DA /* Base */,
156 | );
157 | name = Main.storyboard;
158 | sourceTree = "";
159 | };
160 | 36E27EDC1E93E0E000C4F7DA /* LaunchScreen.storyboard */ = {
161 | isa = PBXVariantGroup;
162 | children = (
163 | 36E27EDD1E93E0E000C4F7DA /* Base */,
164 | );
165 | name = LaunchScreen.storyboard;
166 | sourceTree = "";
167 | };
168 | /* End PBXVariantGroup section */
169 |
170 | /* Begin XCBuildConfiguration section */
171 | 36E27EE01E93E0E000C4F7DA /* Debug */ = {
172 | isa = XCBuildConfiguration;
173 | buildSettings = {
174 | ALWAYS_SEARCH_USER_PATHS = NO;
175 | CLANG_ANALYZER_NONNULL = YES;
176 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
177 | CLANG_CXX_LIBRARY = "libc++";
178 | CLANG_ENABLE_MODULES = YES;
179 | CLANG_ENABLE_OBJC_ARC = YES;
180 | CLANG_WARN_BOOL_CONVERSION = YES;
181 | CLANG_WARN_CONSTANT_CONVERSION = YES;
182 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
183 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
184 | CLANG_WARN_EMPTY_BODY = YES;
185 | CLANG_WARN_ENUM_CONVERSION = YES;
186 | CLANG_WARN_INFINITE_RECURSION = YES;
187 | CLANG_WARN_INT_CONVERSION = YES;
188 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
189 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
190 | CLANG_WARN_UNREACHABLE_CODE = YES;
191 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
192 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
193 | COPY_PHASE_STRIP = NO;
194 | DEBUG_INFORMATION_FORMAT = dwarf;
195 | ENABLE_STRICT_OBJC_MSGSEND = YES;
196 | ENABLE_TESTABILITY = YES;
197 | GCC_C_LANGUAGE_STANDARD = gnu99;
198 | GCC_DYNAMIC_NO_PIC = NO;
199 | GCC_NO_COMMON_BLOCKS = YES;
200 | GCC_OPTIMIZATION_LEVEL = 0;
201 | GCC_PREPROCESSOR_DEFINITIONS = (
202 | "DEBUG=1",
203 | "$(inherited)",
204 | );
205 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
206 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
207 | GCC_WARN_UNDECLARED_SELECTOR = YES;
208 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
209 | GCC_WARN_UNUSED_FUNCTION = YES;
210 | GCC_WARN_UNUSED_VARIABLE = YES;
211 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
212 | MTL_ENABLE_DEBUG_INFO = YES;
213 | ONLY_ACTIVE_ARCH = YES;
214 | SDKROOT = iphoneos;
215 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
216 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
217 | };
218 | name = Debug;
219 | };
220 | 36E27EE11E93E0E000C4F7DA /* Release */ = {
221 | isa = XCBuildConfiguration;
222 | buildSettings = {
223 | ALWAYS_SEARCH_USER_PATHS = NO;
224 | CLANG_ANALYZER_NONNULL = YES;
225 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
226 | CLANG_CXX_LIBRARY = "libc++";
227 | CLANG_ENABLE_MODULES = YES;
228 | CLANG_ENABLE_OBJC_ARC = YES;
229 | CLANG_WARN_BOOL_CONVERSION = YES;
230 | CLANG_WARN_CONSTANT_CONVERSION = YES;
231 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
232 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
233 | CLANG_WARN_EMPTY_BODY = YES;
234 | CLANG_WARN_ENUM_CONVERSION = YES;
235 | CLANG_WARN_INFINITE_RECURSION = YES;
236 | CLANG_WARN_INT_CONVERSION = YES;
237 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
238 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
239 | CLANG_WARN_UNREACHABLE_CODE = YES;
240 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
241 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
242 | COPY_PHASE_STRIP = NO;
243 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
244 | ENABLE_NS_ASSERTIONS = NO;
245 | ENABLE_STRICT_OBJC_MSGSEND = YES;
246 | GCC_C_LANGUAGE_STANDARD = gnu99;
247 | GCC_NO_COMMON_BLOCKS = YES;
248 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
249 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
250 | GCC_WARN_UNDECLARED_SELECTOR = YES;
251 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
252 | GCC_WARN_UNUSED_FUNCTION = YES;
253 | GCC_WARN_UNUSED_VARIABLE = YES;
254 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
255 | MTL_ENABLE_DEBUG_INFO = NO;
256 | SDKROOT = iphoneos;
257 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
258 | VALIDATE_PRODUCT = YES;
259 | };
260 | name = Release;
261 | };
262 | 36E27EE31E93E0E000C4F7DA /* Debug */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
266 | DEVELOPMENT_TEAM = 7PZ7W7SYEE;
267 | INFOPLIST_FILE = SwiftyPhotoClipper/Info.plist;
268 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
269 | PRODUCT_BUNDLE_IDENTIFIER = com.euswag.SwiftyPhotoClipper;
270 | PRODUCT_NAME = "$(TARGET_NAME)";
271 | SWIFT_VERSION = 3.0;
272 | };
273 | name = Debug;
274 | };
275 | 36E27EE41E93E0E000C4F7DA /* Release */ = {
276 | isa = XCBuildConfiguration;
277 | buildSettings = {
278 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
279 | DEVELOPMENT_TEAM = 7PZ7W7SYEE;
280 | INFOPLIST_FILE = SwiftyPhotoClipper/Info.plist;
281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
282 | PRODUCT_BUNDLE_IDENTIFIER = com.euswag.SwiftyPhotoClipper;
283 | PRODUCT_NAME = "$(TARGET_NAME)";
284 | SWIFT_VERSION = 3.0;
285 | };
286 | name = Release;
287 | };
288 | /* End XCBuildConfiguration section */
289 |
290 | /* Begin XCConfigurationList section */
291 | 36E27ECB1E93E0E000C4F7DA /* Build configuration list for PBXProject "SwiftyPhotoClipper" */ = {
292 | isa = XCConfigurationList;
293 | buildConfigurations = (
294 | 36E27EE01E93E0E000C4F7DA /* Debug */,
295 | 36E27EE11E93E0E000C4F7DA /* Release */,
296 | );
297 | defaultConfigurationIsVisible = 0;
298 | defaultConfigurationName = Release;
299 | };
300 | 36E27EE21E93E0E000C4F7DA /* Build configuration list for PBXNativeTarget "SwiftyPhotoClipper" */ = {
301 | isa = XCConfigurationList;
302 | buildConfigurations = (
303 | 36E27EE31E93E0E000C4F7DA /* Debug */,
304 | 36E27EE41E93E0E000C4F7DA /* Release */,
305 | );
306 | defaultConfigurationIsVisible = 0;
307 | };
308 | /* End XCConfigurationList section */
309 | };
310 | rootObject = 36E27EC81E93E0E000C4F7DA /* Project object */;
311 | }
312 |
--------------------------------------------------------------------------------