Skip to content

Commit

Permalink
Update Example Proj.
Browse files Browse the repository at this point in the history
  • Loading branch information
HanSJin committed Jun 4, 2019
1 parent c6fbba0 commit 7a473e8
Show file tree
Hide file tree
Showing 50 changed files with 7,535 additions and 181 deletions.
40 changes: 21 additions & 19 deletions Example/FaceCropImageView.xcodeproj/project.pbxproj
Expand Up @@ -170,7 +170,7 @@
607FACCC1AFB9204008FA782 /* Sources */,
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
093FD97164D00286AAC2A8B6 /* [CP] Embed Pods Frameworks */,
DD641587D1CB27DBF3745D29 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -261,24 +261,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
093FD97164D00286AAC2A8B6 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FaceCropImageView_Example/Pods-FaceCropImageView_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FaceCropImageView/FaceCropImageView.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FaceCropImageView.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FaceCropImageView_Example/Pods-FaceCropImageView_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B6083BC1BF0F2BA355E209B1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -323,6 +305,26 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
DD641587D1CB27DBF3745D29 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FaceCropImageView_Example/Pods-FaceCropImageView_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FaceCropImageView/FaceCropImageView.framework",
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FaceCropImageView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FaceCropImageView_Example/Pods-FaceCropImageView_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
116 changes: 99 additions & 17 deletions Example/FaceCropImageView/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

30 changes: 21 additions & 9 deletions Example/FaceCropImageView/ExampleViewController.swift
Expand Up @@ -8,21 +8,33 @@

import UIKit
import FaceCropImageView
import Kingfisher

class ExampleViewController: UIViewController {

@IBOutlet weak var normalImageView: UIImageView!
@IBOutlet weak var faceCropImageView: UIImageView!

// Outlets
@IBOutlet var normalImageViews: [UIImageView]!
@IBOutlet var faceCropImageViews: [UIImageView]!

// Variables
let imageUrls: [String] = [
"https://cdn.pixabay.com/photo/2018/04/10/12/54/girl-3307264_1280.jpg",
"https://cdn.pixabay.com/photo/2017/09/16/14/33/electrician-2755684_1280.jpg",
"https://cdn.pixabay.com/photo/2019/05/30/20/48/couple-4240713_1280.jpg",
"https://cdn.pixabay.com/photo/2017/08/03/17/36/model-2577543_1280.jpg",
]

override func viewDidLoad() {
super.viewDidLoad()

normalImageView.contentMode = .scaleAspectFill
normalImageView.image = UIImage(named: "jenny12")

faceCropImageView.contentMode = .scaleAspectFill
faceCropImageView.setFaceImage(UIImage(named: "jenny12"), fast: true) { result in
print(result)
for index in 0..<imageUrls.count {
let imageUrl = URL(string: imageUrls[index])

// Set the normal image.
normalImageViews[index].kf.setImage(with: imageUrl)

// Set the face crop image.
faceCropImageViews[index].setFaceImage(with: imageUrl)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Example/Podfile
Expand Up @@ -2,6 +2,7 @@ use_frameworks!

target 'FaceCropImageView_Example' do
pod 'FaceCropImageView', :path => '../'
pod 'Kingfisher'

target 'FaceCropImageView_Tests' do
inherit! :search_paths
Expand Down
14 changes: 11 additions & 3 deletions Example/Podfile.lock
@@ -1,16 +1,24 @@
PODS:
- FaceCropImageView (1.0.0)
- FaceCropImageView (1.0.0):
- Kingfisher
- Kingfisher (4.10.1)

DEPENDENCIES:
- FaceCropImageView (from `../`)
- Kingfisher

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Kingfisher

EXTERNAL SOURCES:
FaceCropImageView:
:path: "../"

SPEC CHECKSUMS:
FaceCropImageView: 95392f45a05060dcaeaba7162f17510e732012de
FaceCropImageView: fc419e3ddf8117c09f07c17c884e12d7847aebe0
Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0

PODFILE CHECKSUM: 1f2acf766d9d7329d6a6d8866286d76c4821ff15
PODFILE CHECKSUM: ff28453d915fc75a55270bb1f1d8c0f707229998

COCOAPODS: 1.7.1
22 changes: 22 additions & 0 deletions Example/Pods/Kingfisher/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

116 changes: 116 additions & 0 deletions Example/Pods/Kingfisher/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a473e8

Please sign in to comment.