Skip to content

Commit

Permalink
Update to swift 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ariok committed Apr 5, 2016
1 parent eb8fbd2 commit 586610d
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 85 deletions.
2 changes: 1 addition & 1 deletion BWWalkthrough.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
9 changes: 8 additions & 1 deletion Example/Pods/Pods.xcodeproj/project.pbxproj

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

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

40 changes: 20 additions & 20 deletions Example/Pods/Target Support Files/BWWalkthrough/Info.plist

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

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

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

12 changes: 6 additions & 6 deletions Pod/Classes/BWWalkthroughPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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){
Expand Down
4 changes: 2 additions & 2 deletions Pod/Classes/BWWalkthroughViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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{

Expand Down

0 comments on commit 586610d

Please sign in to comment.