Liquid Filled Buttons ('-' * 21) A simple way to make a neat looking button link.
A Pen by Scott Berg on CodePen.
// port of http://stackoverflow.com/a/17948778/3071224 | |
import UIKit | |
import Foundation | |
extension CGSize { | |
static func aspectFit(aspectRatio : CGSize, var boundingSize: CGSize) -> CGSize { | |
let mW = boundingSize.width / aspectRatio.width; | |
let mH = boundingSize.height / aspectRatio.height; |