This file contains hidden or 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 Testing : NSObject | |
{ | |
private func privateWork() { | |
} | |
internal func internalWork(){ | |
} | |
This file contains hidden or 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
//: Playground - noun: a place where people can play | |
import UIKit | |
protocol DataSource { | |
func fetchValue() -> String? | |
} | |
protocol DataSourceCacheStrategy { | |
func retrieve<T>(from: [DataSource], using: DataSource -> T?) -> T? |
This file contains hidden or 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
protocol Thing { | |
var name: String { get } | |
} | |
protocol UsingThing { | |
func doSomething(with: Thing) | |
} | |
struct Test: UsingThing { |
This file contains hidden or 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
// | |
// ViewController.swift | |
// BehaviorsDemo | |
// | |
// Created by Saul Mora on 8/25/16. | |
// Copyright © 2016 Magical Panda. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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
//: Playground - noun: a place where people can play | |
import UIKit | |
public protocol Maths | |
{ | |
func doMath(left: Double, right: Double) -> Double | |
} | |
class Addition: NSObject, Maths |
This file contains hidden or 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
//: Playground - noun: a place where people can play | |
//To try out this code, copy and paste into a new Xcode playground. | |
import UIKit | |
class Operation: NSObject | |
{ | |
let nextOperation: Operation? | |
init(next: Operation? = nil) | |
{ |
OlderNewer