Skip to content

Commit

Permalink
Merge pull request #59 from anuragalla/master
Browse files Browse the repository at this point in the history
updated to swift 1.2
  • Loading branch information
mamaral committed Jul 9, 2015
2 parents 1fe514f + 4dd12da commit b3f2f05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Swift/OnboardSwift/OnboardingContentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Swift/OnboardSwift/OnboardingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit b3f2f05

Please sign in to comment.