Skip to content

Instantly share code, notes, and snippets.

View soxjke's full-sized avatar

Petro Korienev soxjke

View GitHub Profile
@soxjke
soxjke / picking.swift
Last active March 10, 2017 10:46 — forked from vojto/picking.swift
struct RectangleConfig {
var width: Int = 0
var height: Int = 0
}
class ConfigView: NSView {
// Models
let config = MutableProperty<RectangleConfig?>(nil)
var width: SignalProducer<Int?, NoError>!
@soxjke
soxjke / injectionexample.swift
Last active October 4, 2016 15:08 — forked from PaulTaykalo/injectionexample.swift
Function Injection example
//: Playground - noun: a place where people can play
import Foundation
import UIKit
typealias ImagePostProcessingOp = (UIImage) -> Void
class ImageProcessor {
let postProcessOp : ImagePostProcessingOp

#Twitter client with offline mode.

  • As a user I can login to Twitter
  • As a user I see my twitter name in the navigation bar
  • As a user I can view my Twitter feed (fail plan: display error)
  • As a user I can refresh my feed using pull-to-refresh (fail plan: display error)
  • As a user I can view my Twitter feed without internet connection
  • As a user I expect that feed will be automatically updated when network connection is available
  • As a user I can tap on system compose button on the right of navigation bar and get to post new tweet screen
  • As a user I can post new tweet (fail plan: display error)