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
public class ExampleViewController: UIViewController { | |
var dependableService: DependableService | |
@IBOutlet var someTextLabel: UITextLabel! | |
class func loadFromStoryboard( | |
dependableService: DependableService) -> ExampleViewController { | |
let controller = UIStoryboard(name:"Main", bundle:NSBundle(forClass:self)) | |
.instantiateViewControllerWithIdentifier("ExampleViewController") | |
as! ExampleViewController |
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
import XCTest | |
import Hamcrest | |
import PactConsumerSwift | |
class CandiesMasterDetailFeature: XCTestCase { | |
override func setUp() { | |
super.setUp() | |
continueAfterFailure = false //So the moment that an assertion in the test fails, we will not continue with the test |
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
flipButton.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
if (mCardSideShowing.equals(CardSide.FRONT)) { | |
getActivity().getFragmentManager() | |
.beginTransaction() | |
.setCustomAnimations(R.animator.card_flip_right_in, R.animator.card_flip_right_out, R.animator.card_flip_left_in, R.animator.card_flip_left_out) | |
.replace(R.id.card_fragment_container, new CardBackFragment()) | |
.commit(); |
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
repositories{ | |
flatDir{ | |
dirs 'libs' | |
} | |
} | |
dependencies { | |
//Design and Aminations | |
compile 'com.android.support:cardview-v7:23.1.1' | |
compile (name:'library-2.4.1', ext:'aar') |
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
import XCTest | |
import Hamcrest | |
@testable import MyExampleApp | |
class ExampleViewControllerTest: XCTestCase { | |
... | |
func testNavigatesToOtherScreen() { |
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
class ExampleViewController: UIViewController { | |
... | |
@IBAction func didTapButtonToGoToOtherViewController(sender: AnyObject) { | |
self.performSegueWithIdentifier("otherViewControllerSegue", sender: nil) | |
} | |
} |
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
import UIKit | |
class ExampleViewController: UIViewController { | |
class func loadFromStoryboard(exampleService: ExampleService) -> ExampleViewController { | |
let exampleViewController:ExampleViewController = | |
UIStoryboard(name:"Main", bundle:NSBundle(forClass:self)) | |
.instantiateViewControllerWithIdentifier("ExampleViewController") | |
as! ExampleViewController |
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
import Foundation | |
class AppEnvironment: NSObject { | |
static let sharedEnvironment = AppEnvironment() | |
let exampleService: ExampleService | |
override init() { | |
self.exampleService = ExampleService() |
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
import UIKit | |
import FutureKit | |
class ListOfFruitsViewController: UITableViewController { | |
... | |
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
if (segue.identifier == "goToFruitDetailsSegue") { | |
if let |
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
import UIKit | |
class FruitDetailViewController: UIViewController { | |
var fruit: FruitAppFruit? | |
... | |
} | |