Skip to content

Commit

Permalink
Fix Cocoapod warning
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeBoisney committed Apr 27, 2016
1 parent b8a17cc commit 2969b88
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions AlertOnboarding/AlertOnboarding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public class AlertOnboarding: UIView {

self.buttonBottom = UIButton(frame: CGRectMake(0,0, 0, 0))
self.buttonBottom.titleLabel?.font = UIFont(name: "Avenir-Black", size: 15)
self.buttonBottom.addTarget(self, action: Selector("onClick"), forControlEvents: .TouchUpInside)
self.buttonBottom.addTarget(self, action: #selector(AlertOnboarding.onClick), forControlEvents: .TouchUpInside)

self.background = UIView(frame: CGRectMake(0,0, 0, 0))
self.background.backgroundColor = UIColor.blackColor()
Expand Down Expand Up @@ -214,7 +214,7 @@ public class AlertOnboarding: UIView {

private func interceptOrientationChange(){
UIDevice.currentDevice().beginGeneratingDeviceOrientationNotifications()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "onOrientationChange", name: UIDeviceOrientationDidChangeNotification, object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AlertOnboarding.onOrientationChange), name: UIDeviceOrientationDidChangeNotification, object: nil)
}

func onOrientationChange(){
Expand Down
4 changes: 2 additions & 2 deletions AlertOnboarding/AlertPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
return nil
}

index--
index -= 1
return self.viewControllerAtIndex(index)
}

func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {

var index = (viewController as! AlertChildPageViewController).pageIndex!

index++
index += 1

if(index == arrayOfImage.count){
return nil
Expand Down
6 changes: 3 additions & 3 deletions Pod/Classes/AlertOnboarding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public class AlertOnboarding: UIView {

self.buttonBottom = UIButton(frame: CGRectMake(0,0, 0, 0))
self.buttonBottom.titleLabel?.font = UIFont(name: "Avenir-Black", size: 15)
self.buttonBottom.addTarget(self, action: Selector("onClick"), forControlEvents: .TouchUpInside)
self.buttonBottom.addTarget(self, action: #selector(AlertOnboarding.onClick), forControlEvents: .TouchUpInside)

self.background = UIView(frame: CGRectMake(0,0, 0, 0))
self.background.backgroundColor = UIColor.blackColor()
Expand Down Expand Up @@ -214,7 +214,7 @@ public class AlertOnboarding: UIView {

private func interceptOrientationChange(){
UIDevice.currentDevice().beginGeneratingDeviceOrientationNotifications()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "onOrientationChange", name: UIDeviceOrientationDidChangeNotification, object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AlertOnboarding.onOrientationChange), name: UIDeviceOrientationDidChangeNotification, object: nil)
}

func onOrientationChange(){
Expand All @@ -224,4 +224,4 @@ public class AlertOnboarding: UIView {
}
}

}
}
6 changes: 3 additions & 3 deletions Pod/Classes/AlertPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
return nil
}

index--
index -= 1
return self.viewControllerAtIndex(index)
}

func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {

var index = (viewController as! AlertChildPageViewController).pageIndex!

index++
index += 1

if(index == arrayOfImage.count){
return nil
Expand Down Expand Up @@ -180,4 +180,4 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
let positionX = alertViewSizeHeight - (alertViewSizeHeight * 0.1) - 50
self.pageControl.frame = CGRectMake(0, positionX, self.view.bounds.width, 50)
}
}
}

0 comments on commit 2969b88

Please sign in to comment.