From a1c0a8ff8c2ae51b6edbb91f6cb2c1cf3b86bf8e Mon Sep 17 00:00:00 2001 From: anuragalla Date: Tue, 30 Jun 2015 13:26:29 +0530 Subject: [PATCH 1/2] Updated to swift 1.2 --- Swift/OnboardSwift/OnboardingContentViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Swift/OnboardSwift/OnboardingContentViewController.swift b/Swift/OnboardSwift/OnboardingContentViewController.swift index 64c63ae..3f9f899 100644 --- a/Swift/OnboardSwift/OnboardingContentViewController.swift +++ b/Swift/OnboardSwift/OnboardingContentViewController.swift @@ -111,7 +111,7 @@ class OnboardingContentViewController: UIViewController { bodyLabel.center = CGPointMake(horizontalCenter, bodyLabel.center.y) self.view.addSubview(bodyLabel) - if (countElements(self.buttonText) != 0) { + if (count(self.buttonText) != 0) { var actionButton: UIButton = UIButton(frame: CGRectMake((CGRectGetMaxX(self.view.frame) / 2) - (contentWidth / 2), CGRectGetMaxY(self.view.frame) - kDefaultMainPageControlHeight - kDefaultActionButtonHeight - self.bottomPadding, contentWidth, kDefaultActionButtonHeight)) actionButton.titleLabel?.font = UIFont .systemFontOfSize(24) actionButton.setTitle(self.buttonText, forState: .Normal) From 80b6175d10a7e9e4cc62de381f474cba431df483 Mon Sep 17 00:00:00 2001 From: anuragalla Date: Tue, 30 Jun 2015 13:28:33 +0530 Subject: [PATCH 2/2] updated to swift 1.2 --- Swift/OnboardSwift/OnboardingViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Swift/OnboardSwift/OnboardingViewController.swift b/Swift/OnboardSwift/OnboardingViewController.swift index 632d594..3a8eca4 100644 --- a/Swift/OnboardSwift/OnboardingViewController.swift +++ b/Swift/OnboardSwift/OnboardingViewController.swift @@ -163,12 +163,12 @@ class OnboardingViewController: UIViewController, UIPageViewControllerDataSource // PRAGMA: page view controller delegate - func pageViewController(pageViewController: UIPageViewController!, didFinishAnimating finished: Bool, previousViewControllers: [AnyObject]!, transitionCompleted completed: Bool) { + func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [AnyObject], transitionCompleted completed: Bool) { if !completed { return } - let newViewController = pageViewController.viewControllers[0] as UIViewController + let newViewController = pageViewController.viewControllers[0] as! UIViewController pageControl.currentPage = indexOfViewController(newViewController) } -} \ No newline at end of file +}