diff --git a/.travis.yml b/.travis.yml index 21bf1a6..1e5fec5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,6 @@ -# references: -# * http://www.objc.io/issue-6/travis-ci.html -# * https://github.com/supermarin/xcpretty#usage +language: swift +xcode_project: Example/CenteredCollectionView.xcworkspace +xcode_schema: CenteredCollectionView_Tests -osx_image: xcode8.2 -language: objective-c -# 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 test -workspace Example/CenteredCollectionView.xcworkspace -scheme CenteredCollectionView-Example -sdk iphonesimulator10.2 -destination 'platform=iOS Simulator,OS=10.2,id=3F31386B-6108-4E3F-BCF7-2A3B0C16AAFE' ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint +env: + - PLATFORM=iOS NAME='iPhone SE' \ No newline at end of file diff --git a/CenteredCollectionView.podspec b/CenteredCollectionView.podspec index ae1b38f..dc140a2 100644 --- a/CenteredCollectionView.podspec +++ b/CenteredCollectionView.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = 'CenteredCollectionView' - s.version = '1.0' + s.version = '1.1' s.summary = 'A `CollectionViewFlowLayout` that \'pages\' and centers it\'s cells 🎡 written in Swift' # This description is used to generate tags and improve search results. @@ -26,7 +26,7 @@ Pod::Spec.new do |s| # * Finally, don't worry about the indent, CocoaPods strips it! s.description = <<-DESC `CenteredCollectionView` is a lightweight drop in place `UICollectionViewFlowLayout` that pages and keeps its cells centered, resulting in the "carousel effect" 🎡 - DESC + DESC s.homepage = 'https://github.com/BenEmdon/CenteredCollectionView' # s.screenshots = 'www.example.com/screenshots_1.gif', 'www.example.com/screenshots_2.gif' diff --git a/Example/CenteredCollectionView.xcodeproj/project.pbxproj b/Example/CenteredCollectionView.xcodeproj/project.pbxproj index 77052d5..96f95eb 100644 --- a/Example/CenteredCollectionView.xcodeproj/project.pbxproj +++ b/Example/CenteredCollectionView.xcodeproj/project.pbxproj @@ -229,16 +229,17 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0820; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0820; + LastSwiftMigration = 0920; + ProvisioningStyle = Automatic; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0820; + LastSwiftMigration = 0920; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -453,14 +454,20 @@ 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_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_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; @@ -501,14 +508,20 @@ 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_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_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; @@ -540,14 +553,18 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = CenteredCollectionView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "io.github.benemdon.CenteredCollectionView-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -558,13 +575,17 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = CenteredCollectionView/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "io.github.benemdon.CenteredCollectionView-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -583,7 +604,8 @@ 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_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -598,7 +620,8 @@ 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_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Example/CenteredCollectionView.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView-Example.xcscheme b/Example/CenteredCollectionView.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView-Example.xcscheme index 4e24bc3..9d55ee7 100644 --- a/Example/CenteredCollectionView.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView-Example.xcscheme +++ b/Example/CenteredCollectionView.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView-Example.xcscheme @@ -1,6 +1,6 @@ CFBundleDevelopmentRegion en + CFBundleDisplayName + CenteredCollectionView CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/Example/CenteredCollectionView/UIColor+Extensions.swift b/Example/CenteredCollectionView/UIColor+Extensions.swift index 9c59856..451a924 100644 --- a/Example/CenteredCollectionView/UIColor+Extensions.swift +++ b/Example/CenteredCollectionView/UIColor+Extensions.swift @@ -10,10 +10,10 @@ import UIKit extension UIColor { static var peach: UIColor { - return UIColor(colorLiteralRed: 1, green: 0.5764705882, blue: 0.5843137255, alpha: 1) + return UIColor(red: 1, green: 0.5764705882, blue: 0.5843137255, alpha: 1) } static var orange: UIColor { - return UIColor(colorLiteralRed: 1, green: 0.5764705882, blue: 0.462745098, alpha: 1) + return UIColor(red: 1, green: 0.5764705882, blue: 0.462745098, alpha: 1) } } diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 98ec380..dcf850a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -315,7 +315,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0920; + TargetAttributes = { + 7E578E146833132BE80B916DF4390314 = { + LastSwiftMigration = 0920; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -383,20 +388,30 @@ 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_DIRECT_OBJC_ISA_USAGE = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + 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_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", @@ -479,7 +494,8 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -511,7 +527,8 @@ PRODUCT_NAME = CenteredCollectionView; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -527,19 +544,29 @@ 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_DIRECT_OBJC_ISA_USAGE = YES; 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + 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_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", @@ -553,6 +580,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView.xcscheme index d7493de..7b75eef 100644 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView.xcscheme @@ -1,6 +1,6 @@ + + + + + + + + @@ -36,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Example/Pods/Target Support Files/CenteredCollectionView/Info.plist b/Example/Pods/Target Support Files/CenteredCollectionView/Info.plist index 34b6750..e0632c2 100644 --- a/Example/Pods/Target Support Files/CenteredCollectionView/Info.plist +++ b/Example/Pods/Target Support Files/CenteredCollectionView/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.1 CFBundleSignature ???? CFBundleVersion diff --git a/README.md b/README.md index 99370c0..b5fa27d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # CenteredCollectionView -[![CI Status](http://img.shields.io/travis/BenEmdon/CenteredCollectionView.svg?style=flat)](https://travis-ci.org/BenEmdon/CenteredCollectionView) +[![CI Status](http://img.shields.io/travis/BenEmdon/CenteredCollectionView.svg?style=flat)](https://travis-ci.org/BenEmdon/CenteredCollectionView.svg?branch=master) [![Version](https://img.shields.io/cocoapods/v/CenteredCollectionView.svg?style=flat)](http://cocoapods.org/pods/CenteredCollectionView) [![Platform](https://img.shields.io/cocoapods/p/CenteredCollectionView.svg?style=flat)](http://cocoapods.org/pods/CenteredCollectionView) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Swift 3](https://img.shields.io/badge/Swift-3.X-orange.svg?style=flat)](https://swift.org) +[![Swift 3](https://img.shields.io/badge/Swift-4-orange.svg?style=flat)](https://swift.org) [![License](https://img.shields.io/cocoapods/l/CenteredCollectionView.svg?style=flat)](http://cocoapods.org/pods/CenteredCollectionView) `CenteredCollectionView` is a lightweight drop in place `UICollectionViewFlowLayout` that _pages_ and keeps its cells centered, resulting in the _"carousel effect"_ 🎡