From 586610d225e3a562aff38f50649ffb506095de75 Mon Sep 17 00:00:00 2001 From: Yari Date: Tue, 5 Apr 2016 23:08:00 +0200 Subject: [PATCH] Update to swift 2.2 --- BWWalkthrough.podspec | 2 +- .../xcschemes/BWWalkthrough-Example.xcscheme | 2 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 9 ++++- .../xcschemes/BWWalkthrough.xcscheme | 39 +++++++++++------- .../BWWalkthrough/Info.plist | 40 +++++++++---------- .../Pods-BWWalkthrough_Example/Info.plist | 40 +++++++++---------- .../Pods-BWWalkthrough_Tests/Info.plist | 40 +++++++++---------- .../BWWalkthroughPageViewController.swift | 12 +++--- Pod/Classes/BWWalkthroughViewController.swift | 4 +- 9 files changed, 103 insertions(+), 85 deletions(-) diff --git a/BWWalkthrough.podspec b/BWWalkthrough.podspec index 109221b..048ed5c 100644 --- a/BWWalkthrough.podspec +++ b/BWWalkthrough.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BWWalkthrough" - s.version = "1.0.1" + s.version = "1.0.2" s.summary = "Generate custom walkthroughs for your apps." s.homepage = "https://github.com/ariok/BWWalkthrough" s.license = 'MIT' diff --git a/Example/BWWalkthrough.xcodeproj/xcshareddata/xcschemes/BWWalkthrough-Example.xcscheme b/Example/BWWalkthrough.xcodeproj/xcshareddata/xcschemes/BWWalkthrough-Example.xcscheme index 7a52c5e..0873652 100644 --- a/Example/BWWalkthrough.xcodeproj/xcshareddata/xcschemes/BWWalkthrough-Example.xcscheme +++ b/Example/BWWalkthrough.xcodeproj/xcshareddata/xcschemes/BWWalkthrough-Example.xcscheme @@ -1,6 +1,6 @@ + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + BuildableIdentifier = "primary" + BlueprintIdentifier = "17664F8F0232329D875EC690EB653867" + BuildableName = "BWWalkthrough.framework" + BlueprintName = "BWWalkthrough" + ReferencedContainer = "container:Pods.xcodeproj"> + shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + debugDocumentVersioning = "YES"> diff --git a/Example/Pods/Target Support Files/BWWalkthrough/Info.plist b/Example/Pods/Target Support Files/BWWalkthrough/Info.plist index 01903d7..e417ac3 100644 --- a/Example/Pods/Target Support Files/BWWalkthrough/Info.plist +++ b/Example/Pods/Target Support Files/BWWalkthrough/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/Pods-BWWalkthrough_Example/Info.plist b/Example/Pods/Target Support Files/Pods-BWWalkthrough_Example/Info.plist index 6974542..11db4b7 100644 --- a/Example/Pods/Target Support Files/Pods-BWWalkthrough_Example/Info.plist +++ b/Example/Pods/Target Support Files/Pods-BWWalkthrough_Example/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Example/Pods/Target Support Files/Pods-BWWalkthrough_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-BWWalkthrough_Tests/Info.plist index 6974542..11db4b7 100644 --- a/Example/Pods/Target Support Files/Pods-BWWalkthrough_Tests/Info.plist +++ b/Example/Pods/Target Support Files/Pods-BWWalkthrough_Tests/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Pod/Classes/BWWalkthroughPageViewController.swift b/Pod/Classes/BWWalkthroughPageViewController.swift index 8b2febf..457ea5e 100755 --- a/Pod/Classes/BWWalkthroughPageViewController.swift +++ b/Pod/Classes/BWWalkthroughPageViewController.swift @@ -88,7 +88,7 @@ public class BWWalkthroughPageViewController: UIViewController, BWWalkthroughPag public func walkthroughDidScroll(position: CGFloat, offset: CGFloat) { - for(var i = 0; i < subsWeights.count ;i++){ + for i in 0 ..< subsWeights.count{ // Perform Transition/Scale/Rotate animations switch animation{ @@ -116,13 +116,13 @@ public class BWWalkthroughPageViewController: UIViewController, BWWalkthroughPag // MARK: Animations (WIP) - private func animationAlpha(index:Int, var _ offset:CGFloat){ + private func animationAlpha(index:Int, _ offset:CGFloat){ let cView = view.subviews[index] - - if(offset > 1.0){ - offset = 1.0 + (1.0 - offset) + var mutableOffset = offset + if(mutableOffset > 1.0){ + mutableOffset = 1.0 + (1.0 - mutableOffset) } - cView.alpha = (offset) + cView.alpha = (mutableOffset) } private func animationCurve(index:Int, _ offset:CGFloat){ diff --git a/Pod/Classes/BWWalkthroughViewController.swift b/Pod/Classes/BWWalkthroughViewController.swift index fd3b15a..9580434 100755 --- a/Pod/Classes/BWWalkthroughViewController.swift +++ b/Pod/Classes/BWWalkthroughViewController.swift @@ -122,7 +122,7 @@ At the moment it's only used to perform custom animations on didScroll. // Initialize UI Elements - pageControl?.addTarget(self, action: "pageControlDidTouch", forControlEvents: UIControlEvents.TouchUpInside) + pageControl?.addTarget(self, action: #selector(BWWalkthroughViewController.pageControlDidTouch), forControlEvents: UIControlEvents.TouchUpInside) // Scrollview @@ -269,7 +269,7 @@ At the moment it's only used to perform custom animations on didScroll. public func scrollViewDidScroll(sv: UIScrollView) { - for var i=0; i < controllers.count; i++ { + for i in 0 ..< controllers.count { if let vc = controllers[i] as? BWWalkthroughPage{