Skip to content

Instantly share code, notes, and snippets.

@jfamiglietti
jfamiglietti / SpinningWaitImageGenerator.swift
Last active May 2, 2016 01:48
Creates a series of images for an animation similar to UIActivityIndicatorView
import UIKit
private extension CGPoint {
/// Multiplies point by given value
/// - parameter value: The x and y coordinates are multipled by this value.
/// - returns: A new CGPoint whose coordinate components have been multiplied by `value`
func multipliedBy(value: CGFloat) -> CGPoint {
return CGPoint(x: self.x * value, y: self.y * value)
}
}