75 Commits

Author SHA1 Message Date
Pete Smith f2bfde4db3 Bump sample version 2020-10-04 11:35:40 +01:00
Pete Smith 4d503abebc Bump versions, remove moya reference 2020-10-04 11:34:57 +01:00
Amit Samant 43893485cc This pull request adds support for Swift Package Manager (#82) 2020-10-04 11:31:18 +01:00
Pete Smith 41fdbd2be0 Update podspec, project versions to 3.1.0 2020-09-14 11:58:34 +01:00
Tejeshwar Amirthy e0fa62820d Vertical scrolling support (#79)
* adding support for vertical carousel scrolling

* using the vertical scrolling of carousel in the example project

* made scrollDirection open
hidden scroll indicator for vertical scroll

Co-authored-by: Tejeshwar Amirthy <amirthy.rao@gdn-commerce.com>
2020-09-14 11:55:53 +01:00
Pete Smith 3cc3d43b59 Update podspec 2020-07-20 16:16:19 +01:00
Pete Smith 2e1748e25b Add cornerRadius property to ScalingCarouselCell (#76) 2020-07-20 16:13:48 +01:00
Pete Smith 847b88b3af Bump version (#74) 2020-05-10 12:27:58 +01:00
Pete Smith c987e11e77 Issue 61 - Call didScroll in sample app as per readMe 2020-05-10 12:22:55 +01:00
Pete Smith a6e3be745e Issue 52 - Disable scrolling, enable paging (#72) 2020-05-10 12:13:56 +01:00
Pete Smith 96d3f40a48 Merge pull request #48 from phimage/patch-1
Update README.md to highlight swift code
2020-05-10 10:29:33 +01:00
Pete Smith 7ffb2d3920 Merge pull request #69 from superpeteblaze/psmith/Fix_Build
Psmith/fix build
2019-10-30 08:20:44 +00:00
Pete Smith 72ad3a47a5 Remove unecessary fileprivate 2019-10-30 08:16:52 +00:00
Pete Smith 8bccccb3f6 Update iOS and device target 2019-10-30 08:11:13 +00:00
Pete Smith 90c5ad9816 Merge pull request #68 from superpeteblaze/psmith/Podspec_Bump
Bump podspec
2019-10-29 16:12:28 +00:00
Pete Smith b47ae2e431 Bump podspec 2019-10-29 16:12:01 +00:00
Pete Smith b52f9ddfbe Merge pull request #67 from superpeteblaze/psmith/Swift5
Fix version
2019-10-29 16:10:04 +00:00
Pete Smith bb6ef1efb0 Fix version 2019-10-29 16:09:26 +00:00
Pete Smith eb682bbce1 Merge pull request #66 from superpeteblaze/psmith/Swift5
Psmith/swift5
2019-10-29 15:51:23 +00:00
Pete Smith 56e22e7fd2 Specify version in podspec 2019-10-29 15:49:57 +00:00
Pete Smith f4e2ff40f9 Update example pod 2019-10-29 15:46:47 +00:00
Pete Smith 05a8c02a36 Revert "Swift 5 update"
This reverts commit cf0f252395.
2019-10-29 15:34:10 +00:00
Pete Smith 61981d3020 Merge pull request #65 from potatotrain/swift_5_update
Swift 5 update
2019-10-28 18:30:55 +00:00
muehlemann cf0f252395 Swift 5 update 2019-10-24 11:06:03 -04:00
Pete Smith 29ae6fd7f6 Update README.md 2019-01-02 15:54:12 +00:00
Eric Marchand 08b0761aff Update README.md to highlight swift code 2018-10-03 15:00:48 +02:00
Pete Smith 05036fd6e1 Bump version to 2.4.1 2018-10-02 12:24:18 +01:00
Pete Smith 8e8ee20ae8 Merge pull request #47 from superpeteblaze/psmith/v2.4.1_Bugfix
Undo unintentional changes
2018-10-02 12:21:09 +01:00
Pete Smith 1e70e49be0 Undo unintentional changes 2018-10-02 12:20:39 +01:00
Pete Smith 054ae02207 Merge pull request #46 from superpeteblaze/psmith/Swift4.2
Psmith/swift4.2
2018-09-29 15:57:00 +01:00
Pete Smith 2baf27aa36 Update travis build 2018-09-29 15:51:53 +01:00
Pete Smith e3cd3f646e Remove empty test target 2018-09-29 15:38:54 +01:00
Pete Smith 1ee942924e Convert to Swift 4.2, bump minimum deployment version to iOS 10 2018-09-29 15:37:12 +01:00
Pete Smith 7bc09a4947 Bump version 2018-05-28 10:37:34 +04:00
Pete Smith e2e0a59efc Merge pull request #39 from pabsanmez/fixOnDeviceRotation
Fix ScalingCarousel on Device Rotation
2018-05-28 10:34:08 +04:00
pabsanmez cf744094b0 Added feature to example 2018-05-27 21:35:02 +02:00
pabsanmez 8f7b1d1b1d Fix Device Rotated and autolayout mainView in code version 2018-05-27 21:20:35 +02:00
Pete Smith 550c7aa195 Merge pull request #35 from superpeteblaze/psmith/v2.2
Psmith/v2.2
2018-04-01 18:13:26 +01:00
Pete Smith 69b1cc6d22 Bump version, podspec 2018-04-01 18:09:42 +01:00
Pete Smith eebd1356e9 Expose scale, alpha related values, allow overriding 2018-04-01 18:08:29 +01:00
Pete Smith 04bf9a7c7a Use flow delegate in example 2018-03-31 19:18:04 +01:00
Pete Smith b7f4bb87d4 Update README.md 2018-03-31 17:47:46 +01:00
Pete Smith 787ec87abf Issue 31: Too many animations are taking place at one time 2018-03-31 17:30:43 +01:00
Pete Smith 2e94769bd3 Update README.md 2018-02-11 15:21:42 +00:00
Pete Smith 75f7785f71 Merge pull request #29 from superpeteblaze/psmith/v2.1
Bump podspec
2018-02-11 15:15:11 +00:00
Pete Smith 4e0a19958f Bump podspec 2018-02-11 15:14:16 +00:00
Pete Smith 7561da5d7e Update README.md 2018-02-10 19:44:45 +00:00
Pete Smith c4a8a1b5b7 Update .gitignore 2018-02-10 19:40:27 +00:00
Pete Smith 702a21ed8f Delete Cartfile.resolved 2018-02-10 19:40:14 +00:00
Pete Smith b44ae189f9 Delete Cartfile 2018-02-10 19:40:06 +00:00
Pete Smith 36256171a1 Update .gitignore 2018-02-10 19:39:46 +00:00
Pete Smith be535d4e91 Merge pull request #28 from superpeteblaze/psmith/Carthage
Iterate;
2018-02-10 19:36:57 +00:00
Pete Smith 8342e44b8c Iterate; 2018-02-10 19:36:16 +00:00
Pete Smith 27c48a2f68 Delete Cartfile.resolved 2018-02-10 19:33:20 +00:00
Pete Smith d29e86ea17 Delete Cartfile 2018-02-10 19:33:12 +00:00
Pete Smith d00019e3a3 Merge pull request #27 from superpeteblaze/psmith/Carthage
Add new framework to main project
2018-02-10 18:56:47 +00:00
Pete Smith 9436995265 Add new framework to main project 2018-02-10 18:55:36 +00:00
Pete Smith 42f70a3546 Merge pull request #26 from superpeteblaze/psmith/Carthage_Support
Psmith/carthage support
2018-02-10 18:29:20 +00:00
Pete Smith ba7dd7847c Example project cartfile 2018-02-10 18:27:16 +00:00
Pete Smith ac1559f8b0 Update README.md 2018-02-10 18:23:54 +00:00
Pete Smith 2b2b1f068c Share scheme 2018-02-10 18:10:20 +00:00
Pete Smith fff4434923 Update README.md 2017-12-10 14:43:55 +00:00
superpeteblaze f9455456b1 Bump project 2017-12-05 18:03:04 +00:00
Pete Smith 8f13b5ce91 Merge pull request #20 from superpeteblaze/psmith/CellTooLargeBug
Fix cell too large
2017-12-05 17:58:19 +00:00
superpeteblaze ced108bee8 Fix cell too large 2017-12-05 17:57:46 +00:00
superpeteblaze 215aadd502 Bump version, update podspec 2017-11-08 14:16:05 +00:00
Pete Smith e8ec9ebc74 Merge pull request #19 from cs-joao-souza/master
Variable modifications
2017-11-08 14:13:50 +00:00
João Pedro 8157c8d465 Variable modifications
Change currentCenterCell to open var;
Change currentCenterCellIndex to open var;
2017-11-06 13:44:44 -02:00
Pete Smith f658f94c69 Fix v2.0 release 2017-11-02 09:42:34 +07:00
Pete Smith 85462bf513 Merge pull request #14 from superpeteblaze/psmith/Swift4
Psmith/swift4
2017-10-07 15:52:08 +01:00
Pete Smith 77300f8afa Pod Swift version file 2017-10-07 15:47:42 +01:00
Pete Smith 04f51a0069 Project file 2017-09-17 19:37:33 +01:00
Pete Smith 7b02dd484c Add currentCenterCell properties 2017-07-10 14:19:33 +01:00
Pete Smith 8ac39b1dd7 Swift4 2017-06-19 16:35:42 +01:00
Pete Smith 79b4d4a0d0 Swift4 2017-06-19 16:11:20 +01:00
52 changed files with 1096 additions and 1361 deletions
+3
View File
@@ -23,6 +23,9 @@ DerivedData
.bundle
Carthage
Cartfile
Cartfile.resolved
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
+3 -2
View File
@@ -3,12 +3,13 @@
# * https://github.com/supermarin/xcpretty#usage
language: objective-c
osx_image: xcode8
osx_image: xcode12
# cache: cocoapods
# podfile: Example/Podfile
before_install:
- gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild -workspace Example/ScalingCarousel.xcworkspace -scheme ScalingCarousel-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=10.0,name=iPhone 7' ONLY_ACTIVE_ARCH=NO | xcpretty
- set -o pipefail && xcodebuild -workspace Example/ScalingCarousel.xcworkspace -scheme ScalingCarousel-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=13.0,name=iPhone 11' ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
- swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator"
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

-6
View File
@@ -2,10 +2,4 @@ use_frameworks!
target 'ScalingCarousel_Example' do
pod 'ScalingCarousel', :path => '../'
target 'ScalingCarousel_Tests' do
inherit! :search_paths
end
end
+4 -4
View File
@@ -1,5 +1,5 @@
PODS:
- ScalingCarousel (0.1.0)
- ScalingCarousel (3.1.1)
DEPENDENCIES:
- ScalingCarousel (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
ScalingCarousel: 9ccb50bc287484fb5ca64ab50e0a4938521a93fb
ScalingCarousel: b7968a97f8bbefdd900e089221bb39a3e2069dd9
PODFILE CHECKSUM: aaf53f72e837000e0cec9b542eb92f29695d1812
PODFILE CHECKSUM: eb98ed396fdf8c805a77f2d1f034cb686f11deb6
COCOAPODS: 1.1.1
COCOAPODS: 1.9.3
+10 -8
View File
@@ -1,9 +1,9 @@
{
"name": "ScalingCarousel",
"version": "0.1.0",
"summary": "A short description of ScalingCarousel.",
"description": "TODO: Add long description of the pod here.",
"homepage": "https://github.com/<GITHUB_USERNAME>/ScalingCarousel",
"version": "3.2.0",
"summary": "A super simple carousel view with scaling transitions written in Swift",
"description": "ScalingCarousel provides a simple carousel-style collection view.\nIt takes care of cell presentation, scaling each cell as the collection view is scrolled.\n\nIt is used in Bikey to present bike station information.",
"homepage": "https://github.com/superpeteblaze/ScalingCarousel",
"license": {
"type": "MIT",
"file": "LICENSE"
@@ -12,11 +12,13 @@
"Pete Smith": "peadar81@gmail.com"
},
"source": {
"git": "https://github.com/<GITHUB_USERNAME>/ScalingCarousel.git",
"tag": "0.1.0"
"git": "https://github.com/superpeteblaze/ScalingCarousel.git",
"tag": "v3.2.0"
},
"platforms": {
"ios": "8.0"
"ios": "10.0"
},
"source_files": "ScalingCarousel/Classes/**/*"
"swift_versions": "5",
"source_files": "Sources/ScalingCarousel/**/*",
"swift_version": "5"
}
Generated Vendored
+4 -4
View File
@@ -1,5 +1,5 @@
PODS:
- ScalingCarousel (0.1.0)
- ScalingCarousel (3.1.1)
DEPENDENCIES:
- ScalingCarousel (from `../`)
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
ScalingCarousel: 9ccb50bc287484fb5ca64ab50e0a4938521a93fb
ScalingCarousel: b7968a97f8bbefdd900e089221bb39a3e2069dd9
PODFILE CHECKSUM: aaf53f72e837000e0cec9b542eb92f29695d1812
PODFILE CHECKSUM: eb98ed396fdf8c805a77f2d1f034cb686f11deb6
COCOAPODS: 1.1.1
COCOAPODS: 1.9.3
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -1,11 +1,33 @@
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
@@ -19,19 +41,24 @@ install_framework()
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
# Use filter instead of exclude so missing patterns don't throw errors.
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}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
elif [ -L "${binary}" ]; then
echo "Destination binary is symlinked..."
dirname="$(dirname "${binary}")"
binary="${dirname}/$(readlink "${binary}")"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
@@ -45,7 +72,7 @@ install_framework()
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
@@ -54,38 +81,127 @@ install_framework()
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
warn_missing_arch=${2:-true}
if [ -r "$source" ]; then
# Copy the dSYM into the targets temp dir.
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}\""
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}"
local basename
basename="$(basename -s .dSYM "$source")"
binary_name="$(ls "$source/Contents/Resources/DWARF")"
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
strip_invalid_archs "$binary" "$warn_missing_arch"
fi
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
# Move the stripped file into its final destination.
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}\""
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}"
else
# 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.
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
fi
fi
}
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
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}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\""
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
warn_missing_arch=${2:-true}
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
fi
STRIP_BINARY_RETVAL=0
return
fi
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
lipo -remove "$arch" -output "$binary" "$binary"
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=1
}
install_artifact() {
artifact="$1"
base="$(basename "$artifact")"
case $base in
*.framework)
install_framework "$artifact"
;;
*.dSYM)
# Suppress arch warnings since XCFrameworks will include many dSYM files
install_dsym "$artifact" "false"
;;
*.bcsymbolmap)
install_bcsymbolmap "$artifact"
;;
*)
echo "error: Unrecognized artifact "$artifact""
;;
esac
}
copy_artifacts() {
file_list="$1"
while read artifact; do
install_artifact "$artifact"
done <$file_list
}
ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
if [ -r "${ARTIFACT_LIST_FILE}" ]; then
copy_artifacts "${ARTIFACT_LIST_FILE}"
fi
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/ScalingCarousel/ScalingCarousel.framework"
install_framework "${BUILT_PRODUCTS_DIR}/ScalingCarousel/ScalingCarousel.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/ScalingCarousel/ScalingCarousel.framework"
install_framework "${BUILT_PRODUCTS_DIR}/ScalingCarousel/ScalingCarousel.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
@@ -1,96 +0,0 @@
#!/bin/sh
set -e
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH"
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
@@ -1,5 +1,13 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
@@ -1,11 +1,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel/ScalingCarousel.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel/ScalingCarousel.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "ScalingCarousel"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,11 +1,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel/ScalingCarousel.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel/ScalingCarousel.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "ScalingCarousel"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -1,3 +0,0 @@
# Acknowledgements
This application makes use of the following third party libraries:
Generated by CocoaPods - https://cocoapods.org
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_ScalingCarousel_Tests : NSObject
@end
@implementation PodsDummy_Pods_ScalingCarousel_Tests
@end
@@ -1,84 +0,0 @@
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\""
/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
}
@@ -1,96 +0,0 @@
#!/bin/sh
set -e
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH"
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
@@ -1,8 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
FOUNDATION_EXPORT double Pods_ScalingCarousel_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_ScalingCarousel_TestsVersionString[];
@@ -1,8 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel/ScalingCarousel.framework/Headers"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}/Pods
@@ -1,6 +0,0 @@
framework module Pods_ScalingCarousel_Tests {
umbrella header "Pods-ScalingCarousel_Tests-umbrella.h"
export *
module * { export * }
}
@@ -1,8 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel/ScalingCarousel.framework/Headers"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}/Pods
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -1,4 +1,12 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
@@ -1,5 +1,13 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
@@ -0,0 +1,10 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -0,0 +1,10 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ScalingCarousel
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,9 +0,0 @@
CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ScalingCarousel
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
+91 -238
View File
@@ -7,32 +7,18 @@
objects = {
/* Begin PBXBuildFile section */
371D5443D4C13439BA9B90F3 /* Pods_ScalingCarousel_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 458709EF51094BC6F4D04000 /* Pods_ScalingCarousel_Example.framework */; };
56B3452030AFA76E567C5BDE /* Pods_ScalingCarousel_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B5BA65FCAD75DAB10B57A9 /* Pods_ScalingCarousel_Tests.framework */; };
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
607FACD81AFB9204008FA782 /* StoryboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* StoryboardViewController.swift */; };
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
65678AFE206FEAF900A0ED42 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 65678AFD206FEAF900A0ED42 /* Default-568h@2x.png */; };
65E99FA11E1519D50026BEC4 /* CodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65E99FA01E1519D50026BEC4 /* CodeViewController.swift */; };
C6618DAE3DE8113DB4EAFAA9 /* Pods_ScalingCarousel_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EDBA98D3B6D4A1D88262FFD /* Pods_ScalingCarousel_Example.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 607FACCF1AFB9204008FA782;
remoteInfo = ScalingCarousel;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
2AC39C6CC3E82205FC41C768 /* Pods-ScalingCarousel_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ScalingCarousel_Tests/Pods-ScalingCarousel_Tests.release.xcconfig"; sourceTree = "<group>"; };
2CDA8F1B0A30ECE4574BBC6B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
458709EF51094BC6F4D04000 /* Pods_ScalingCarousel_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ScalingCarousel_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
54ACDAF6D64CCC3389CF9744 /* Pods-ScalingCarousel_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example.debug.xcconfig"; sourceTree = "<group>"; };
607FACD01AFB9204008FA782 /* ScalingCarousel_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScalingCarousel_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -40,15 +26,15 @@
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
607FACE51AFB9204008FA782 /* ScalingCarousel_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ScalingCarousel_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
65678AFD206FEAF900A0ED42 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
659A02AC202F775500587C36 /* ScalingCarousel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScalingCarousel.h; sourceTree = "<group>"; };
659A02AD202F775500587C36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
65E99FA01E1519D50026BEC4 /* CodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeViewController.swift; sourceTree = "<group>"; };
76B5BA65FCAD75DAB10B57A9 /* Pods_ScalingCarousel_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ScalingCarousel_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
89D32616AEF95F03E816E2C3 /* Pods-ScalingCarousel_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Example.release.xcconfig"; path = "Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example.release.xcconfig"; sourceTree = "<group>"; };
9EDBA98D3B6D4A1D88262FFD /* Pods_ScalingCarousel_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ScalingCarousel_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B4E24FA6EB33F7731B8832FD /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
BA63361010B0F437C40DBABF /* Pods-ScalingCarousel_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ScalingCarousel_Tests/Pods-ScalingCarousel_Tests.debug.xcconfig"; sourceTree = "<group>"; };
C076B0D8341FA770E7E1424B /* Pods-ScalingCarousel_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example.release.xcconfig"; sourceTree = "<group>"; };
D4431AA1F74964D7F1D89BD4 /* ScalingCarousel.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ScalingCarousel.podspec; path = ../ScalingCarousel.podspec; sourceTree = "<group>"; };
F172F921357CEEEB996B8EF4 /* Pods-ScalingCarousel_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScalingCarousel_Example.debug.xcconfig"; path = "Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -56,39 +42,23 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
371D5443D4C13439BA9B90F3 /* Pods_ScalingCarousel_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE21AFB9204008FA782 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
56B3452030AFA76E567C5BDE /* Pods_ScalingCarousel_Tests.framework in Frameworks */,
C6618DAE3DE8113DB4EAFAA9 /* Pods_ScalingCarousel_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
3FA1F2A62E4ADD293B1EF2D3 /* Frameworks */ = {
isa = PBXGroup;
children = (
458709EF51094BC6F4D04000 /* Pods_ScalingCarousel_Example.framework */,
76B5BA65FCAD75DAB10B57A9 /* Pods_ScalingCarousel_Tests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
607FACC71AFB9204008FA782 = {
isa = PBXGroup;
children = (
65678AFD206FEAF900A0ED42 /* Default-568h@2x.png */,
607FACF51AFB993E008FA782 /* Podspec Metadata */,
607FACD21AFB9204008FA782 /* Example */,
607FACE81AFB9204008FA782 /* Tests */,
659A02AB202F775500587C36 /* ScalingCarousel */,
607FACD11AFB9204008FA782 /* Products */,
AB4C669AD33FFC8D61F2C71C /* Pods */,
3FA1F2A62E4ADD293B1EF2D3 /* Frameworks */,
B6A2109DB13DAE15C2E098DF /* Pods */,
977EEA47608D0E4C3AD28941 /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -96,7 +66,6 @@
isa = PBXGroup;
children = (
607FACD01AFB9204008FA782 /* ScalingCarousel_Example.app */,
607FACE51AFB9204008FA782 /* ScalingCarousel_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -122,23 +91,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
607FACE81AFB9204008FA782 /* Tests */ = {
isa = PBXGroup;
children = (
607FACEB1AFB9204008FA782 /* Tests.swift */,
607FACE91AFB9204008FA782 /* Supporting Files */,
);
path = Tests;
sourceTree = "<group>";
};
607FACE91AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
607FACEA1AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
@@ -149,6 +101,15 @@
name = "Podspec Metadata";
sourceTree = "<group>";
};
659A02AB202F775500587C36 /* ScalingCarousel */ = {
isa = PBXGroup;
children = (
659A02AC202F775500587C36 /* ScalingCarousel.h */,
659A02AD202F775500587C36 /* Info.plist */,
);
path = ScalingCarousel;
sourceTree = "<group>";
};
65F37E001E1400640034CFF8 /* Storyboard */ = {
isa = PBXGroup;
children = (
@@ -183,15 +144,21 @@
name = Resources;
sourceTree = "<group>";
};
AB4C669AD33FFC8D61F2C71C /* Pods */ = {
977EEA47608D0E4C3AD28941 /* Frameworks */ = {
isa = PBXGroup;
children = (
54ACDAF6D64CCC3389CF9744 /* Pods-ScalingCarousel_Example.debug.xcconfig */,
C076B0D8341FA770E7E1424B /* Pods-ScalingCarousel_Example.release.xcconfig */,
BA63361010B0F437C40DBABF /* Pods-ScalingCarousel_Tests.debug.xcconfig */,
2AC39C6CC3E82205FC41C768 /* Pods-ScalingCarousel_Tests.release.xcconfig */,
9EDBA98D3B6D4A1D88262FFD /* Pods_ScalingCarousel_Example.framework */,
);
name = Pods;
name = Frameworks;
sourceTree = "<group>";
};
B6A2109DB13DAE15C2E098DF /* Pods */ = {
isa = PBXGroup;
children = (
F172F921357CEEEB996B8EF4 /* Pods-ScalingCarousel_Example.debug.xcconfig */,
89D32616AEF95F03E816E2C3 /* Pods-ScalingCarousel_Example.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
@@ -201,12 +168,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScalingCarousel_Example" */;
buildPhases = (
BA663BC8D55C4A023C2ED9E6 /* [CP] Check Pods Manifest.lock */,
D93D57586D7582ADCFD48D6A /* [CP] Check Pods Manifest.lock */,
607FACCC1AFB9204008FA782 /* Sources */,
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
C3DFC5D82C263B445B53FBDD /* [CP] Embed Pods Frameworks */,
2F81D719AB74666EA6BF3325 /* [CP] Copy Pods Resources */,
4E0BE5B3C02A4D44C48EE380 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -217,27 +183,6 @@
productReference = 607FACD01AFB9204008FA782 /* ScalingCarousel_Example.app */;
productType = "com.apple.product-type.application";
};
607FACE41AFB9204008FA782 /* ScalingCarousel_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScalingCarousel_Tests" */;
buildPhases = (
AA74BD7EB113F9466B0D7AC2 /* [CP] Check Pods Manifest.lock */,
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
2EA17C40F55BF7F7F0EAFBD9 /* [CP] Embed Pods Frameworks */,
CB654E16ABAC105B309D80F5 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
607FACE71AFB9204008FA782 /* PBXTargetDependency */,
);
name = ScalingCarousel_Tests;
productName = Tests;
productReference = 607FACE51AFB9204008FA782 /* ScalingCarousel_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -245,17 +190,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0820;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0820;
TestTargetID = 607FACCF1AFB9204008FA782;
DevelopmentTeam = 49CJ89TL4W;
LastSwiftMigration = 1110;
};
};
};
@@ -264,6 +205,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
@@ -273,7 +215,6 @@
projectRoot = "";
targets = (
607FACCF1AFB9204008FA782 /* ScalingCarousel_Example */,
607FACE41AFB9204008FA782 /* ScalingCarousel_Tests */,
);
};
/* End PBXProject section */
@@ -284,109 +225,53 @@
buildActionMask = 2147483647;
files = (
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
65678AFE206FEAF900A0ED42 /* Default-568h@2x.png in Resources */,
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE31AFB9204008FA782 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
2EA17C40F55BF7F7F0EAFBD9 /* [CP] Embed Pods Frameworks */ = {
4E0BE5B3C02A4D44C48EE380 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/ScalingCarousel/ScalingCarousel.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ScalingCarousel.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ScalingCarousel_Tests/Pods-ScalingCarousel_Tests-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
2F81D719AB74666EA6BF3325 /* [CP] Copy Pods Resources */ = {
D93D57586D7582ADCFD48D6A /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
AA74BD7EB113F9466B0D7AC2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ScalingCarousel_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
showEnvVarsInLog = 0;
};
BA663BC8D55C4A023C2ED9E6 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
showEnvVarsInLog = 0;
};
C3DFC5D82C263B445B53FBDD /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ScalingCarousel_Example/Pods-ScalingCarousel_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
CB654E16ABAC105B309D80F5 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ScalingCarousel_Tests/Pods-ScalingCarousel_Tests-resources.sh\"\n";
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;
};
/* End PBXShellScriptBuildPhase section */
@@ -402,24 +287,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE11AFB9204008FA782 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 607FACCF1AFB9204008FA782 /* ScalingCarousel_Example */;
targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
607FACD91AFB9204008FA782 /* Main.storyboard */ = {
isa = PBXVariantGroup;
@@ -448,13 +317,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -477,7 +356,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -493,13 +372,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -515,76 +404,49 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
607FACF01AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 54ACDAF6D64CCC3389CF9744 /* Pods-ScalingCarousel_Example.debug.xcconfig */;
baseConfigurationReference = F172F921357CEEEB996B8EF4 /* Pods-ScalingCarousel_Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 49CJ89TL4W;
INFOPLIST_FILE = ScalingCarousel/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.2.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
607FACF11AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C076B0D8341FA770E7E1424B /* Pods-ScalingCarousel_Example.release.xcconfig */;
baseConfigurationReference = 89D32616AEF95F03E816E2C3 /* Pods-ScalingCarousel_Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 49CJ89TL4W;
INFOPLIST_FILE = ScalingCarousel/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.2.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
607FACF31AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BA63361010B0F437C40DBABF /* Pods-ScalingCarousel_Tests.debug.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
607FACF41AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2AC39C6CC3E82205FC41C768 /* Pods-ScalingCarousel_Tests.release.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
@@ -609,15 +471,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScalingCarousel_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACF31AFB9204008FA782 /* Debug */,
607FACF41AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 607FACC81AFB9204008FA782 /* Project object */;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -41,6 +41,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ScalingCarousel_Example.app"
BlueprintName = "ScalingCarousel_Example"
ReferencedContainer = "container:ScalingCarousel.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@@ -53,26 +62,19 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ScalingCarousel_Example.app"
BlueprintName = "ScalingCarousel_Example"
ReferencedContainer = "container:ScalingCarousel.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
stopOnEveryThreadSanitizerIssue = "YES"
stopOnEveryMainThreadCheckerIssue = "YES"
migratedStopOnEveryIssue = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
@@ -85,8 +87,6 @@
ReferencedContainer = "container:ScalingCarousel.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
+2 -27
View File
@@ -13,34 +13,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// 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.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// 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.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16E144f" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="jed-5q-J52">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BY5-bO-M1j">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -12,19 +12,15 @@
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="StoryboardViewController" customModule="ScalingCarousel_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Mq8-SH-Mx8" customClass="ScalingCarouselView" customModule="ScalingCarousel">
<rect key="frame" x="0.0" y="353" width="375" height="250"/>
<rect key="frame" x="0.0" y="103" width="375" height="500"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="250" id="9nX-Ku-j46"/>
<constraint firstAttribute="height" constant="500" id="9nX-Ku-j46"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="BKc-yN-cAB">
<size key="itemSize" width="50" height="50"/>
@@ -41,7 +37,7 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RJs-7r-dhV">
<rect key="frame" x="-0.5" y="0.0" width="50" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</subviews>
@@ -68,69 +64,75 @@
</connections>
</collectionView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KAz-De-GJ8">
<rect key="frame" x="150" y="105" width="74" height="30"/>
<rect key="frame" x="150.5" y="85" width="74" height="30"/>
<state key="normal" title="Show/Hide"/>
<connections>
<action selector="showHideButtonPressed:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="Jsy-vc-cWp"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UYO-rO-XuZ">
<rect key="frame" x="187.5" y="123" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Mq8-SH-Mx8" firstAttribute="width" secondItem="kh9-bI-dsS" secondAttribute="width" id="4Ux-ib-2uZ"/>
<constraint firstItem="KAz-De-GJ8" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="85" id="Ffh-uk-Qnl"/>
<constraint firstItem="2fi-mo-0CV" firstAttribute="top" secondItem="Mq8-SH-Mx8" secondAttribute="bottom" constant="15" id="Kee-s5-jSC"/>
<constraint firstItem="KAz-De-GJ8" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="M5E-lE-5Pp"/>
<constraint firstItem="Mq8-SH-Mx8" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="NPp-qY-rgM"/>
<constraint firstItem="UYO-rO-XuZ" firstAttribute="centerX" secondItem="KAz-De-GJ8" secondAttribute="centerX" id="8U2-jX-Aw6"/>
<constraint firstItem="KAz-De-GJ8" firstAttribute="top" secondItem="6xk-R0-sgg" secondAttribute="top" constant="85" id="Ffh-uk-Qnl"/>
<constraint firstItem="6xk-R0-sgg" firstAttribute="bottom" secondItem="Mq8-SH-Mx8" secondAttribute="bottom" constant="15" id="Kee-s5-jSC"/>
<constraint firstItem="KAz-De-GJ8" firstAttribute="centerX" secondItem="6xk-R0-sgg" secondAttribute="centerX" id="M5E-lE-5Pp"/>
<constraint firstItem="Mq8-SH-Mx8" firstAttribute="leading" secondItem="6xk-R0-sgg" secondAttribute="leading" id="NPp-qY-rgM"/>
<constraint firstItem="UYO-rO-XuZ" firstAttribute="top" secondItem="KAz-De-GJ8" secondAttribute="bottom" constant="8" id="nfn-SZ-h6K"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6xk-R0-sgg"/>
</view>
<tabBarItem key="tabBarItem" title="Storyboard" id="7Ol-Hv-b1V"/>
<connections>
<outlet property="carousel" destination="Mq8-SH-Mx8" id="PYK-cv-2wb"/>
<outlet property="carouselBottomConstraint" destination="Kee-s5-jSC" id="HnZ-jP-gpN"/>
<outlet property="output" destination="UYO-rO-XuZ" id="v8Z-xt-lyT"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-332" y="-851"/>
<point key="canvasLocation" x="-1122" y="-1047"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="eqA-eL-972">
<objects>
<tabBarController id="BY5-bO-M1j" sceneMemberID="viewController">
<tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="9bU-a6-6gx">
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tabBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="viewControllers" id="V6k-Nc-Rnj"/>
<segue destination="GQ1-V2-c06" kind="relationship" relationship="viewControllers" id="4Qb-nt-Ms8"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="5u5-Rc-3uB" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-2116" y="-646"/>
</scene>
<!--Code-->
<scene sceneID="xPD-nt-BgT">
<objects>
<viewController id="GQ1-V2-c06" customClass="CodeViewController" customModule="ScalingCarousel_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="5AE-Qq-kPx"/>
<viewControllerLayoutGuide type="bottom" id="9A3-dh-CXO"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="eKu-Eq-cui">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<viewLayoutGuide key="safeArea" id="vm8-mu-b8r"/>
</view>
<tabBarItem key="tabBarItem" title="Code" id="kLX-so-YYg"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Cgm-DY-ogT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-332" y="-40"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="t1i-tV-bQ3">
<objects>
<tabBarController automaticallyAdjustsScrollViewInsets="NO" id="jed-5q-J52" sceneMemberID="viewController">
<toolbarItems/>
<tabBar key="tabBar" contentMode="scaleToFill" id="Xg8-GK-uv2">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="viewControllers" id="eFb-K1-qYg"/>
<segue destination="GQ1-V2-c06" kind="relationship" relationship="viewControllers" id="fz0-ik-wQS"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iNH-e4-Uuq" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1431" y="-467"/>
<point key="canvasLocation" x="-1122" y="-309"/>
</scene>
</scenes>
</document>
@@ -16,6 +16,13 @@ class CodeCell: ScalingCarouselCell {
mainView = UIView(frame: contentView.bounds)
contentView.addSubview(mainView)
mainView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
mainView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
mainView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
mainView.topAnchor.constraint(equalTo: contentView.topAnchor),
mainView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
])
}
required init?(coder aDecoder: NSCoder) {
@@ -40,6 +47,13 @@ class CodeViewController: UIViewController {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
if scalingCarousel != nil {
scalingCarousel.deviceRotated()
}
}
// MARK: - Configuration
@@ -47,6 +61,7 @@ class CodeViewController: UIViewController {
let frame = CGRect(x: 0, y: 0, width: 0, height: 0)
scalingCarousel = ScalingCarouselView(withFrame: frame, andInset: 20)
scalingCarousel.scrollDirection = .vertical
scalingCarousel.dataSource = self
scalingCarousel.delegate = self
scalingCarousel.translatesAutoresizingMaskIntoConstraints = false
@@ -76,7 +91,11 @@ extension CodeViewController: UICollectionViewDataSource {
if let scalingCell = cell as? ScalingCarouselCell {
scalingCell.mainView.backgroundColor = .blue
}
DispatchQueue.main.async {
cell.setNeedsLayout()
cell.layoutIfNeeded()
}
return cell
}
}
+7 -14
View File
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -13,27 +13,20 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
+19
View File
@@ -0,0 +1,19 @@
//
// ScalingCarousel.h
// ScalingCarousel
//
// Created by Pete Smith on 10/02/2018.
// Copyright © 2018 CocoaPods. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ScalingCarousel.
FOUNDATION_EXPORT double ScalingCarouselVersionNumber;
//! Project version string for ScalingCarousel.
FOUNDATION_EXPORT const unsigned char ScalingCarouselVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ScalingCarousel/PublicHeader.h>
@@ -18,6 +18,7 @@ class StoryboardViewController: UIViewController {
// MARK: - IBOutlets
@IBOutlet weak var carousel: ScalingCarouselView!
@IBOutlet weak var carouselBottomConstraint: NSLayoutConstraint!
@IBOutlet weak var output: UILabel!
private struct Constants {
static let carouselHideConstant: CGFloat = -250
@@ -29,7 +30,11 @@ class StoryboardViewController: UIViewController {
carouselBottomConstraint.constant = Constants.carouselHideConstant
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
carousel.deviceRotated()
}
// MARK: - Button Actions
@IBAction func showHideButtonPressed(_ sender: Any) {
@@ -52,8 +57,15 @@ extension CarouselDatasource: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
if let scalingCell = cell as? ScalingCarouselCell {
scalingCell.mainView.backgroundColor = .red
scalingCell.cornerRadius = 40
}
DispatchQueue.main.async {
cell.setNeedsLayout()
cell.layoutIfNeeded()
}
return cell
@@ -65,5 +77,23 @@ extension StoryboardViewController: UICollectionViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
carousel.didScroll()
guard let currentCenterIndex = carousel.currentCenterCellIndex?.row else { return }
output.text = String(describing: currentCenterIndex)
}
}
private typealias ScalingCarouselFlowDelegate = StoryboardViewController
extension ScalingCarouselFlowDelegate: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 0
}
}
-24
View File
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
-29
View File
@@ -1,29 +0,0 @@
import UIKit
import XCTest
import ScalingCarousel
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}
}
+29
View File
@@ -0,0 +1,29 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "ScalingCarousel",
platforms: [SupportedPlatform.iOS(.v10)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "ScalingCarousel",
targets: ["ScalingCarousel"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "ScalingCarousel",
dependencies: []),
.testTarget(
name: "ScalingCarouselTests",
dependencies: ["ScalingCarousel"]),
]
)
+61 -6
View File
@@ -1,9 +1,11 @@
# ScalingCarousel
[![CI Status](http://img.shields.io/travis/Pete Smith/ScalingCarousel.svg?style=flat)](https://travis-ci.org/Pete Smith/ScalingCarousel)
[![CI Status](http://img.shields.io/travis/superpeteblaze/ScalingCarousel.svg?style=flat)](https://travis-ci.org/superpeteblaze/ScalingCarousel)
[![Version](https://img.shields.io/cocoapods/v/ScalingCarousel.svg?style=flat)](http://cocoapods.org/pods/ScalingCarousel)
[![License](https://img.shields.io/cocoapods/l/ScalingCarousel.svg?style=flat)](http://cocoapods.org/pods/ScalingCarousel)
[![Platform](https://img.shields.io/cocoapods/p/ScalingCarousel.svg?style=flat)](http://cocoapods.org/pods/ScalingCarousel)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)
ScalingCarousel provides a simple carousel-style collection view.
It takes care of cell presentation, scaling each cell as the collection view is scrolled.
@@ -31,26 +33,47 @@ ScalingCarousel can be added via both storyboard/xib and code, as described belo
* Add a view to the cell's content view, and connect this via the Connections Inspector (in Interface builder) to the cell's mainView IBOutlet.
This property is declared in ScalingCarouselCell. You should add any cell content to this view.
* Note: To ensure correct scaling of the ScalingCarouselCell, you need to call the following code after you configure your cell with it's data (e.g in `cellForItem(at:)`):
```swift
cell.setNeedsLayout()
cell.layoutIfNeeded()
```
* Note: To ensure correct displayed of the ScalingCarousel, you need to call the following code in the method `viewWillTransition(to size:, with coordinator:)` of the ViewController:
```swift
super.viewWillTransition(to: size, with: coordinator)
scalingCarousel.deviceRotated()
```
### Code
* Create a custom UICollectionViewCell which inherits from ScalingCarouselCell. Initialize the mainView property, which is declared in ScalingCarouselCell;
```
```swift
override init(frame: CGRect) {
super.init(frame: frame)
// Initialize the mainView property and add it to the cell's contentView
mainView = UIView(frame: contentView.bounds)
contentView.addSubview(mainView)
mainView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
mainView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
mainView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
mainView.topAnchor.constraint(equalTo: contentView.topAnchor),
mainView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
])
}
```
* Create and add a ScalingCarouselView to your view, and implement the standard UICollectionViewDatasource methods in your view controller;
```
```swift
// Create our carousel
let scalingCarousel = ScalingCarouselView(withFrame: frame, andInset: 20)
scalingCarousel.dataSource = self
scalingCarousel.delegate = self
scalingCarousel.translatesAutoresizingMaskIntoConstraints = false
// Register our custom cell for dequeueing
@@ -68,23 +91,55 @@ scalingCarousel.topAnchor.constraint(equalTo: view.topAnchor, constant: 50).isAc
* Set your UIViewController as the collection view delegate and implement the UIScrollViewDelegate method scrollViewDidScroll(:). In this method, call the didScroll() method of ScalingCarouselView
* Note: To ensure correct scaling of the ScalingCarouselCell, you need to call the following code after you configure your cell with it's data (e.g in `cellForItem(at:)`):
```swift
cell.setNeedsLayout()
cell.layoutIfNeeded()
```
* Note: To ensure correct displayed of the ScalingCarousel, you need to call the following code in the method `viewWillTransition(to size:, with coordinator:)` of the ViewController, If you have created the ScalingCarousel by code in the viewDidLoad, It is important to verify that it exists when the method `viewWillTransition` is called or we will have a crash if we load the viewController with the device in landscape mode:
```swift
super.viewWillTransition(to: size, with: coordinator)
if scalingCarousel != nil {
scalingCarousel.deviceRotated()
}
```
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
iOS 9
iOS 10
## Installation
ScalingCarousel is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
ScalingCarousel is available through [CocoaPods](http://cocoapods.org), [Carthage](https://github.com/Carthage/Carthage) and [Swift Package Manager](https://swift.org/package-manager/).
To install via Cocoapods, add the following line to your Podfile:
```ruby
pod "ScalingCarousel"
```
To install via Carthage, add the following line to your Podfile:
```
github "superpeteblaze/ScalingCarousel"
```
To install via Swift package manager:
> Note: Instructions below are for using **SwiftPM** without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add ScalingCarousel from there.
To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your `Package.swift`:
```swift
.package(url: "https://github.com/superpeteblaze/ScalingCarousel.git", .upToNextMajor(from: "3.2.0"))
```
## Author
Pete Smith, peadar81@gmail.com
+4 -3
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'ScalingCarousel'
s.version = '1.0.2'
s.version = '3.2.0'
s.summary = 'A super simple carousel view with scaling transitions written in Swift'
s.description = <<-DESC
@@ -25,7 +25,8 @@ It is used in Bikey to present bike station information.
s.source = { :git => 'https://github.com/superpeteblaze/ScalingCarousel.git', :tag => "v#{s.version.to_s}" }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '9.0'
s.ios.deployment_target = '10.0'
s.swift_version = '5'
s.source_files = 'ScalingCarousel/Classes/**/*'
s.source_files = 'Sources/ScalingCarousel/**/*'
end
View File
@@ -20,16 +20,26 @@ import UIKit
*/
open class ScalingCarouselCell: UICollectionViewCell {
// MARK: - Properties (Public)
/// The minimum value to scale to, should be set between 0 and 1
open var scaleMinimum: CGFloat = 0.9
/// Divisior used when calculating the scale value.
/// Lower values cause a greater difference in scale between subsequent cells.
open var scaleDivisor: CGFloat = 10.0
/// The minimum value to alpha to, should be set between 0 and 1
open var alphaMinimum: CGFloat = 0.85
/// The corner radius value of the cell's main view
open var cornerRadius: CGFloat = 20.0
// MARK: - IBOutlets
// This property should be connected to the main cell subview
@IBOutlet public var mainView: UIView!
private struct InternalConstants {
static let alphaSmallestValue: CGFloat = 0.85
static let scaleDivisor: CGFloat = 10.0
}
// MARK: - Overrides
override open func layoutSubviews() {
@@ -49,32 +59,33 @@ open class ScalingCarouselCell: UICollectionViewCell {
/// Scale the cell when it is scrolled
///
/// - parameter carouselInset: The inset of the related SPBCarousel view
/// - parameter scaleMinimum: The minimun % a cell should scale to,
/// expressed as a value between 0.0 and 1.0
open func scale(withCarouselInset carouselInset: CGFloat,
scaleMinimum: CGFloat = 0.9) {
open func scale(withCarouselInset carouselInset: CGFloat) {
// Ensure we have a superView, and mainView
guard let superview = superview,
let mainView = mainView else { return }
// Get our absolute origin value
let originX = superview.convert(frame, to: nil).origin.x
// Get our absolute origin value and width/height based on the scroll direction
var origin = superview.convert(frame, to: superview.superview).origin.x
var contentWidthOrHeight = frame.size.width
if let collectionView = superview as? ScalingCarouselView, collectionView.scrollDirection == .vertical {
origin = superview.convert(frame, to: superview.superview).origin.y
contentWidthOrHeight = frame.size.height
}
// Calculate our actual origin.x value using our inset
let originXActual = originX - carouselInset
let originActual = origin - carouselInset
let width = frame.size.width
// Calculate our scale values
let scaleCalculator = fabs(width - fabs(originXActual))
let percentageScale = (scaleCalculator/width)
let scaleCalculator = abs(contentWidthOrHeight - abs(originActual))
let percentageScale = (scaleCalculator/contentWidthOrHeight)
let scaleValue = scaleMinimum
+ (percentageScale/InternalConstants.scaleDivisor)
+ (percentageScale/scaleDivisor)
let alphaValue = InternalConstants.alphaSmallestValue
+ (percentageScale/InternalConstants.scaleDivisor)
let alphaValue = alphaMinimum
+ (percentageScale/scaleDivisor)
let affineIdentity = CGAffineTransform.identity
@@ -83,6 +94,6 @@ open class ScalingCarouselCell: UICollectionViewCell {
mainView.alpha = alphaValue
// ..also..round the corners
mainView.layer.cornerRadius = 20
mainView.layer.cornerRadius = cornerRadius
}
}
@@ -35,16 +35,28 @@ open class ScalingCarouselLayout: UICollectionViewFlowLayout {
// Set itemSize based on total width and inset
itemSize = collectionViewSize
itemSize.width = itemSize.width - (inset * 2)
// Set scrollDirection and paging
scrollDirection = .horizontal
var direction: UICollectionView.ScrollDirection = .horizontal
if let collectionView = collectionView as? ScalingCarouselView {
direction = collectionView.scrollDirection
}
scrollDirection = direction
// set item height/width and sectionInset based on scroll direction
if scrollDirection == .vertical {
itemSize.height = itemSize.height - (inset * 2)
sectionInset = UIEdgeInsets(top: inset, left: 0.0, bottom: inset, right: 0.0)
} else {
itemSize.width = itemSize.width - (inset * 2)
sectionInset = UIEdgeInsets(top: 0.0, left: inset, bottom: 0.0, right: inset)
}
collectionView?.isPagingEnabled = true
minimumLineSpacing = 0.0
minimumInteritemSpacing = 0.0
sectionInset = UIEdgeInsets(top: 0.0, left: inset, bottom: 0.0, right: inset)
footerReferenceSize = CGSize.zero
headerReferenceSize = CGSize.zero
}
@@ -16,9 +16,15 @@ import UIKit
are scaled as the carousel scrolls.
*/
open class ScalingCarouselView: UICollectionView {
// MARK: - Properties (Private)
private var lastCurrentCenterCellIndex: IndexPath?
// MARK: - Properties (Public)
open var scrollDirection: UICollectionView.ScrollDirection = .horizontal
/// Inset of the main, center cell
@IBInspectable public var inset: CGFloat = 0.0 {
didSet {
@@ -30,6 +36,34 @@ open class ScalingCarouselView: UICollectionView {
}
}
/// Returns the current center cell of the carousel if it can be calculated
open var currentCenterCell: UICollectionViewCell? {
let lowerBound = inset - 20
let upperBound = inset + 20
for cell in visibleCells {
let cellRect = convert(cell.frame, to: nil)
if scrollDirection == .horizontal && cellRect.origin.x > lowerBound && cellRect.origin.x < upperBound {
return cell
} else if scrollDirection == .vertical && cellRect.origin.y > lowerBound && cellRect.origin.y < upperBound {
return cell
}
}
return nil
}
/// Returns the IndexPath of the current center cell if it can be calculated
open var currentCenterCellIndex: IndexPath? {
guard let currentCenterCell = self.currentCenterCell else { return nil }
return indexPath(for: currentCenterCell)
}
/// Override of the collection view content size to add an observer
override open var contentSize: CGSize {
didSet {
@@ -49,15 +83,20 @@ open class ScalingCarouselView: UICollectionView {
}
// Set the invisibleScrollView contentSize width based on number of items
let contentWidth = invisibleScrollView.frame.width * CGFloat(numberItems)
invisibleScrollView.contentSize = CGSize(width: contentWidth, height: invisibleScrollView.frame.height)
if scrollDirection == .horizontal {
let contentWidth = invisibleScrollView.frame.width * CGFloat(numberItems)
invisibleScrollView.contentSize = CGSize(width: contentWidth, height: invisibleScrollView.frame.height)
} else {
let contentHeight = invisibleScrollView.frame.height * CGFloat(numberItems)
invisibleScrollView.contentSize = CGSize(width: invisibleScrollView.frame.width, height: contentHeight)
}
}
}
// MARK: - Properties (Private)
fileprivate var invisibleScrollView: UIScrollView!
fileprivate var invisibleWidthConstraint: NSLayoutConstraint?
fileprivate var invisibleLeftConstraint: NSLayoutConstraint?
fileprivate var invisibleWidthOrHeightConstraint: NSLayoutConstraint?
fileprivate var invisibleLeftOrTopConstraint: NSLayoutConstraint?
// MARK: - Lifecycle
@@ -86,12 +125,16 @@ open class ScalingCarouselView: UICollectionView {
invisibleScrollView.setContentOffset(rect.origin, animated: animated)
}
override open func scrollToItem(at indexPath: IndexPath, at scrollPosition: UICollectionViewScrollPosition, animated: Bool) {
override open func scrollToItem(at indexPath: IndexPath, at scrollPosition: UICollectionView.ScrollPosition, animated: Bool) {
super.scrollToItem(at: indexPath, at: scrollPosition, animated: animated)
let originX = (CGFloat(indexPath.item) * (frame.size.width - (inset * 2)))
let rect = CGRect(x: originX, y: 0, width: frame.size.width - (inset * 2), height: frame.height)
var origin = (CGFloat(indexPath.item) * (frame.size.width - (inset * 2)))
var rect = CGRect(x: origin, y: 0, width: frame.size.width - (inset * 2), height: frame.height)
if scrollDirection == .vertical {
origin = (CGFloat(indexPath.item) * (frame.size.height - (inset * 2)))
rect = CGRect(x: 0, y: origin, width: frame.width, height: frame.size.height - (inset * 2))
}
scrollRectToVisible(rect, animated: animated)
lastCurrentCenterCellIndex = indexPath
}
override open func didMoveToSuperview() {
@@ -115,12 +158,36 @@ open class ScalingCarouselView: UICollectionView {
public func didScroll() {
scrollViewDidScroll(self)
}
/*
This method should ALWAYS be called from the ViewController that handles the ScalingCarousel when
the viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) method is called
e.g Implement:
func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
carousel.deviceRotated()
}
*/
public func deviceRotated() {
guard let lastCurrentCenterCellIndex = currentCenterCellIndex ?? lastCurrentCenterCellIndex else { return }
DispatchQueue.main.async {
self.reloadData()
var position: UICollectionView.ScrollPosition = .centeredHorizontally
if self.scrollDirection == .vertical {
position = .centeredVertically
}
self.scrollToItem(at: lastCurrentCenterCellIndex, at: position, animated: false)
self.didScroll()
}
}
}
private typealias PrivateAPI = ScalingCarouselView
fileprivate extension PrivateAPI {
fileprivate func addInvisibleScrollView(to superview: UIView?) {
func addInvisibleScrollView(to superview: UIView?) {
guard let superview = superview else { return }
/// Add our 'invisible' scrollview
@@ -128,6 +195,7 @@ fileprivate extension PrivateAPI {
invisibleScrollView.translatesAutoresizingMaskIntoConstraints = false
invisibleScrollView.isPagingEnabled = true
invisibleScrollView.showsHorizontalScrollIndicator = false
invisibleScrollView.showsVerticalScrollIndicator = false
/*
Disable user interaction on the 'invisible' scrollview,
@@ -139,13 +207,13 @@ fileprivate extension PrivateAPI {
invisibleScrollView.delegate = self
/*
Now add the invisible scrollview's pan
Now add the invisible scrollview's pan
gesture recognizer to the ScalingCarouselView
*/
addGestureRecognizer(invisibleScrollView.panGestureRecognizer)
/*
Finally, add the 'invisible' scrollview as a subview
Finally, add the 'invisible' scrollview as a subview
of the ScalingCarousel's superview
*/
superview.addSubview(invisibleScrollView)
@@ -154,9 +222,13 @@ fileprivate extension PrivateAPI {
Add constraints for height and top, relative to the
ScalingCarouselView
*/
invisibleScrollView.heightAnchor.constraint(equalTo: heightAnchor).isActive = true
invisibleScrollView.topAnchor.constraint(equalTo: topAnchor).isActive = true
if scrollDirection == .horizontal {
invisibleScrollView.heightAnchor.constraint(equalTo: heightAnchor).isActive = true
invisibleScrollView.topAnchor.constraint(equalTo: topAnchor).isActive = true
} else {
invisibleScrollView.widthAnchor.constraint(equalTo: widthAnchor).isActive = true
invisibleScrollView.leftAnchor.constraint(equalTo: leftAnchor).isActive = true
}
/*
Further configure our layout and add more constraints
for width and left position
@@ -164,7 +236,7 @@ fileprivate extension PrivateAPI {
configureLayout()
}
fileprivate func configureLayout() {
func configureLayout() {
// Create a ScalingCarouselLayout using our inset
collectionViewLayout = ScalingCarouselLayout(
@@ -177,21 +249,29 @@ fileprivate extension PrivateAPI {
guard let invisibleScrollView = invisibleScrollView else { return }
// Remove constraints if they already exist
invisibleWidthConstraint?.isActive = false
invisibleLeftConstraint?.isActive = false
invisibleWidthOrHeightConstraint?.isActive = false
invisibleLeftOrTopConstraint?.isActive = false
/*
Add constrants for width and left postion
to our 'invisible' UIScrollView
/*
Add constrants for width and left postion
to our 'invisible' UIScrollView if scroll Direction is horizontal
height and top position if scroll Direction is vertical
*/
invisibleWidthConstraint = invisibleScrollView.widthAnchor.constraint(
equalTo: widthAnchor, constant: -(2 * inset))
invisibleLeftConstraint = invisibleScrollView.leftAnchor.constraint(
equalTo: leftAnchor, constant: inset)
if scrollDirection == .horizontal {
invisibleWidthOrHeightConstraint = invisibleScrollView.widthAnchor.constraint(equalTo: widthAnchor, constant: -(2 * inset))
invisibleLeftOrTopConstraint = invisibleScrollView.leftAnchor.constraint(equalTo: leftAnchor, constant: inset)
} else {
invisibleWidthOrHeightConstraint = invisibleScrollView.heightAnchor.constraint(equalTo: heightAnchor, constant: -(2 * inset))
invisibleLeftOrTopConstraint = invisibleScrollView.topAnchor.constraint(equalTo: topAnchor, constant: inset)
}
// Activate the constraints
invisibleWidthConstraint?.isActive = true
invisibleLeftConstraint?.isActive = true
invisibleWidthOrHeightConstraint?.isActive = true
invisibleLeftOrTopConstraint?.isActive = true
// To avoid carousel moving when cell is tapped
isPagingEnabled = true
isScrollEnabled = false
}
}
@@ -219,6 +299,8 @@ extension InvisibleScrollDelegate: UIScrollViewDelegate {
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
delegate?.scrollViewDidEndDecelerating?(scrollView)
guard let indexPath = currentCenterCellIndex else { return }
lastCurrentCenterCellIndex = indexPath
}
private func updateOffSet() {
+7
View File
@@ -0,0 +1,7 @@
import XCTest
import ScalingCarouselTests
var tests = [XCTestCaseEntry]()
tests += ScalingCarouselTests.allTests()
XCTMain(tests)
@@ -0,0 +1,14 @@
import XCTest
@testable import ScalingCarousel
final class ScalingCarouselTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
}
static var allTests = [
("testExample", testExample),
]
}
@@ -0,0 +1,9 @@
import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ScalingCarouselTests.allTests),
]
}
#endif