-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
184 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// ChooseModeViewController.swift | ||
// PullToRefresh | ||
// | ||
// Created by Josip Cavar on 01/08/15. | ||
// Copyright (c) 2015 Josip Cavar. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class ChooseModeViewController: UIViewController { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
// Do any additional setup after loading the view. | ||
} | ||
|
||
override func didReceiveMemoryWarning() { | ||
super.didReceiveMemoryWarning() | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@IBAction func defaultAction(sender: AnyObject) { | ||
showControllerWithMode(.Default) | ||
} | ||
|
||
@IBAction func beatAction(sender: AnyObject) { | ||
showControllerWithMode(.Beat) | ||
} | ||
|
||
@IBAction func pacmanAction(sender: AnyObject) { | ||
showControllerWithMode(.Pacman) | ||
} | ||
|
||
@IBAction func customAction(sender: AnyObject) { | ||
showControllerWithMode(.Custom) | ||
} | ||
|
||
func showControllerWithMode(mode: ExampleMode) { | ||
if let pullToRefreshViewControler = self.storyboard?.instantiateViewControllerWithIdentifier("PullToRefreshViewController") as? PullToRefreshViewController { | ||
pullToRefreshViewControler.exampleMode = mode | ||
navigationController?.pushViewController(pullToRefreshViewControler, animated: true) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.