- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
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 | |
import ImageIO | |
import MobileCoreServices | |
extension UIImage { | |
static func animatedGif(from images: [UIImage]) { | |
let fileProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: 0]] as CFDictionary | |
let frameProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [(kCGImagePropertyGIFDelayTime as String): 1.0]] as CFDictionary | |
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 | |
extension Date { | |
func toString(format: String = "yyyy-MM-dd") -> String { | |
let formatter = DateFormatter() | |
formatter.dateStyle = .short | |
formatter.dateFormat = format | |
return formatter.string(from: self) | |
} |
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
// Returns a random Emoji 🌿 | |
extension String{ | |
func randomEmoji()->String{ | |
let range = 0x1F601...0x1F64F | |
let ascii = range.startIndex + Int(arc4random_uniform(UInt32(range.count))) | |
let emoji = String(UnicodeScalar(ascii)) | |
return emoji | |
} | |
} |
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
// | |
// UIAlertController+Utilities.h | |
// | |
// Created by valvoline on 18/12/14. | |
// Copyright (c) 2014 sofapps. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIAlertController (Utilities) |
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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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
static UIImage *imageWithSize(CGSize size) { | |
static CGFloat const kThickness = 20; | |
static CGFloat const kLineWidth = 1; | |
static CGFloat const kShadowWidth = 8; | |
UIGraphicsBeginImageContextWithOptions(size, NO, 0); { | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextAddArc(gc, size.width / 2, size.height / 2, | |
(size.width - kThickness - kLineWidth) / 2, | |
-M_PI / 4, -3 * M_PI / 4, YES); |
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/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
NewerOlder