Skip to content

Instantly share code, notes, and snippets.

@jjrscott
jjrscott / AffineTransformMakeFromPointToPoint.m
Last active August 29, 2015 14:06
Use two points to generate a transform which will rotate one the start point to the angle of the second.
CGAffineTransform AffineTransformToPositionOnLines(const CGPoint points[],
size_t count,
CGFloat position,
BOOL rotate)
{
CGAffineTransform transform = CGAffineTransformIdentity;
if (count > 1)
{
for (size_t index = 0;index<count-1;index++)
@jjrscott
jjrscott / JJRSMovingOn.h
Last active August 29, 2015 14:01
Macros to ensure a certain runtime level of iOS, then emit compiler warnings when the iOS Deployment Target reaches that level.
//
// JJRSMovingOn.h
//
// The MIT License (MIT)
//
// Copyright (c) 2014 John James Ralph Scott
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights