Skip to content

Instantly share code, notes, and snippets.

Ryan McLeod warpling

Block or report user

Report or block warpling

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@warpling
warpling / Mento.playground
Last active Aug 1, 2019
Copying Tinder's "mentos" button animation (based on tweet: https://twitter.com/warpling/status/930567671015358464?s=20)
View Mento.playground
//: Playground - noun: a place where people can play
import UIKit
class Mento: UIView {
// The thickness ratio of our mento, 1.0 being a perfect sphere.
let mentoThicknessScale: CGFloat = 0.60
let shape: UIView = {
@warpling
warpling / Moon.h
Last active Apr 19, 2019
🌔 Drawing an accurate moon with UIBezierPath
View Moon.h
//
// Moon.h
// Blackbox
//
// Created by Ryan McLeod on 12/2/14.
// Copyright (c) 2014 Ryan McLeod. All rights reserved.
//
#import <UIKit/UIKit.h>
@warpling
warpling / CAMediaTimingFunction+Extended.swift
Created Jan 22, 2019
CAMediaTimingFunctions (Swift 4)
View CAMediaTimingFunction+Extended.swift
//
// CAMediaTimingFunctions+Extended.swift
// Geiger
//
// Created by Ryan McLeod on 1/22/19.
// Copyright © 2019 Grow Pixel. All rights reserved.
//
import Foundation
View MathTools.h
// Maps one range onto another
// Example: [-50, 100] to [0, 1.0]
// Example: [0.2, 1.0] to [1.0, 0.0]
#define MAPRANGE(x, inputLow, inputHigh, outputLow, outputHigh) ({\
__typeof(x) __x = (x); \
__typeof(inputLow) __inputLow = (inputLow); \
__typeof(inputHigh) __inputHigh = (inputHigh); \
__typeof(outputLow) __outputLow = (outputLow); \
__typeof(outputHigh) __outputHigh = (outputHigh); \
(((__x - __inputLow) / (__inputHigh - __inputLow)) * (__outputHigh - __outputLow)) + __outputLow; \
View SharkfoodMuteSwitchDetector.h
//
// SharkfoodMuteSwitchDetector.h
//
// Created by Moshe Gottlieb on 6/2/13.
// Copyright (c) 2013 Sharkfood. All rights reserved.
//
#import <Foundation/Foundation.h>
View SKAction+FadeColorAction.h
//
// SKAction+FadeColorAction.h
//
#import <SpriteKit/SpriteKit.h>
@interface SKAction (FadeColorAction)
+ (SKAction*) fadeColorFrom:(SKColor*)fromColor toColor:(SKColor*)toColor duration:(CGFloat)duration;
View MotionOrientation.h
//
// MotionOrientation.h
//
// Originally based on code by Sangwon Park on 5/3/12.
// Copyright (c) 2012 tastyone@gmail.com. All rights reserved.
// Heavily modified by Ryan McLeod on 10/3/14
// Copyright (c) 2014 ryanmcleod@gmail.com. All rights reserved.
#import <CoreMotion/CoreMotion.h>
#import <CoreGraphics/CoreGraphics.h>
View extraUIActivityTypes.m
// UIActivityTypes
NSString * const UIActivityTypePostToInstagram = @"com.burbn.instagram.shareextension";
NSString * const UIActivityTypeFacebookMessenger = @"com.facebook.Messenger.ShareExtension";
NSString * const UIActivityTypeWhatsApp = @"net.whatsapp.WhatsApp.ShareExtension";
NSString * const UIActivityTypeTelegraph = @"ph.telegra.Telegraph.Share";
NSString * const UIActivityTypeGmail = @"com.google.Gmail.ShareExtension";
NSString * const UIActivityTypeTencent = @"com.tencent.mqq.ShareExtension";
NSString * const UIActivityTypeViber = @"com.viber.app-share-extension";
NSString * const UIActivityTypeTumblr = @"com.tumblr.tumblr.Share-With-Tumblr";
NSString * const UIActivityTypeSkype = @"com.skype.skype.sharingextension";
@warpling
warpling / CircularTextView.h
Last active Mar 21, 2017
CircularTextView (as seen in the iOS app Blackbox)
View CircularTextView.h
//
// CircularTextView.h
// Wormhole
//
// Created by Ryan McLeod on 5/5/15.
// Copyright (c) 2015 Ryan McLeod. All rights reserved.
//
#import <UIKit/UIKit.h>
@warpling
warpling / CircleBloom.h
Last active Jul 25, 2016
Circle Bloom!?
View CircleBloom.h
//
// CircleBloom.h
// Blackbox
//
// Created by Ryan McLeod on 7/25/16.
// Copyright © 2016 Ryan McLeod. All rights reserved.
//
#import <UIKit/UIKit.h>
You can’t perform that action at this time.