- Introduction to Functional Programming Johannes Weiß - http://kcy.me/1ngiv
- ReactiveCocoa at MobiDevDay Andrew Sardone - http://kcy.me/1nhl3
- The Future Of ReactiveCocoa Justin Spahr-Summers - http://kcy.me/1nhs7
- Enemy of the State Justin Spahr-Summers - http://kcy.me/1njzs
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - http://kcy.me/1pyva
- Functioning as a Functionalist Andy Matuschak - http://kcy.me/22o45
- Controlling Complexity in Swift Andy Matuschak - http://kcy.me/23sc9
- Functional and reactive programming with Swift Ash Furrow -
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
/** | |
* @author Eberhard Graether / http://egraether.com/ | |
*/ | |
THREE.TrackballControls = function ( object, domElement ) { | |
var _this = this; | |
var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5 }; | |
this.object = object; |
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 TabBarController: UITabBarController { | |
var indicatorImage: UIImageView? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let numberOfItems = CGFloat(tabBar.items!.count) |
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 | |
import UIKit | |
/// Used to create a layout guide that pins to the top of the keyboard | |
final class KeyboardLayoutGuide { | |
private let notificationCenter: NotificationCenter | |
private let bottomConstraint: NSLayoutConstraint |
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
@implementation PolygonOverlayRenderer | |
- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context { | |
if (!MKMapRectIntersectsRect(self.overlay.boundingMapRect, mapRect)) { | |
return; | |
} | |
UIGraphicsPushContext(context); | |
// overlay is a custom MKOverlay that contains multiple polygons and polylines for this renderer to draw |
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
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="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
#!/bin/sh | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
# make sure the output directory exists | |
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
# Step 1. Build Device and Simulator versions | |
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
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
extension Hashable { | |
var hashNumber: NSNumber { | |
return NSNumber(value: hashValue) | |
} | |
} | |
private class ObjectWrapper { | |
let value: Any | |
init(_ value: Any) { |
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
/** | |
A default implmentation that provides a few convenience methods for starting and stopping coordinators. | |
*/ | |
extension Coordinator { | |
// Default implementation, so that we don't have to do this for all coordinators. | |
func startChild<T: NSObject where T: Coordinator>(coordinator coordinator: T, withIdentifier identifier: String, callback: CoordinatorCallback?) -> T { | |
childCoordinators[identifier] = coordinator | |
coordinator.start(withCallback: callback) | |
return coordinator |
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 protocol Cachable { | |
var fileName: String { get } | |
func transform() -> Data | |
} | |
final public class Cacher { | |
let destination: URL | |
private let queue = OperationQueue() | |
public enum CacheDestination { |