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 UIKit | |
class GenericViewController: UIViewController { | |
var contentView: GenericView { | |
return view as! GenericView | |
} | |
init() { | |
super.init(nibName: nil, bundle: nil) |
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 UIKit | |
class GenericView: UIView { | |
let stackView = UIStackView() | |
init() { | |
super.init(frame: CGRectZero) | |
setup() | |
} | |
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 UIKit | |
import Forbind | |
import ForbindExtensions | |
enum LoadingState { | |
case NotSet | |
case Loading | |
case Loaded | |
} |
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
case SomeEnum { | |
case A | |
case B | |
} | |
let someValue = SomeEnum.A | |
if someValue == .A { | |
// Do something | |
} |
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
ant | |
automake | |
brew-cask | |
coreutils | |
go | |
hub | |
libyaml | |
node | |
pkg-config | |
ruby |
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
// | |
// TableViewDataSource.swift | |
// QuickReply | |
// | |
// Created by Kristian Andersen on 31/07/14. | |
// Copyright (c) 2014 Robocat. 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
public class ArrayDataSource<CellType: UIView, ItemType> { | |
private var items: [ItemType] | |
private var cellReuseIdentifier: String | |
private var configureClosure: (CellType, ItemType) -> Void | |
private var proxy: DataSourceProxy! | |
private unowned var view: UIView | |
public init(view: UIView, items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) { | |
self.items = items | |
self.cellReuseIdentifier = cellReuseIdentifier |
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
class ArrayDataSource<CellType: UIView, ItemType>: NSObject, UITableViewDataSource, UICollectionViewDataSource { | |
var items: [ItemType] | |
var cellReuseIdentifier: String | |
var configureClosure: (CellType, ItemType) -> Void | |
init(items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) { | |
self.items = items | |
self.cellReuseIdentifier = cellReuseIdentifier | |
self.configureClosure = configureClosure | |
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
@interface JSONFixture : NSObject | |
+ (id)fixtureDataWithName:(NSString *)fixtureName; | |
@end | |
@implementation JSONFixture | |
+ (id)fixtureDataWithName:(NSString *)fixtureName { |
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
" ========= Initial setup =========== | |
" Use Vim settings, rather than Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" backspace in insert mode works like normal editor | |
set backspace=2 | |
syntax on " syntax highlighting |