Skip to content

Instantly share code, notes, and snippets.

View cocoaNib's full-sized avatar

Renate Wünschl cocoaNib

  • Hamburg, Germany
View GitHub Profile
@raphaelschaad
raphaelschaad / RSTimingFunction.h
Last active June 10, 2024 11:47
All the cool animation curves from `CAMediaTimingFunction` but not limited to use with CoreAnimation. See what you can do with cubic Bezier curves here: http://netcetera.org/camtf-playground.html To get started just "Download Gist", throw the .h and .m files into your Xcode project and you're good to go!
//
// RSTimingFunction.h
//
// Created by Raphael Schaad on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <UIKit/UIKit.h>
@winzig
winzig / Alamofire+UIImage.swift
Last active August 11, 2016 07:53
Ray Wenderlich's UIImage serializer for Alamofire, updated for Alamofire 3.0 and Swift 2
extension Alamofire.Request {
/** Response serializer for images from: http://www.raywenderlich.com/85080/beginning-alamofire-tutorial */
public static func imageResponseSerializer() -> ResponseSerializer<UIImage, NSError> {
return ResponseSerializer { request, response, data, error in
guard let validData = data else {
let failureReason = "Data could not be serialized. Input data was nil."
let error = Error.errorWithCode(.DataSerializationFailed, failureReason: failureReason)
return .Failure(error)