Author: Chris Lattner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TimingFunction.swift | |
// | |
// Created by tcldr on 04/11/2018. | |
// https://github.com/tcldr | |
// Copyright © 2018 tcldr. | |
// | |
// Permission is hereby granted, free of charge, | |
// to any person obtaining a copy of this software and | |
// associated documentation files (the "Software"), to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIAccessorizedTextField.swift | |
// AccessorizedTextField | |
// | |
// Created by Damien Laughton on 28/03/2018. | |
// 2018 Mobilology Limited. No rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ITERATION=1 | |
EXTENSION="mp4" | |
FILENAME="$HOME/Desktop/Simulator Recording.$EXTENSION" | |
while [ -e "$FILENAME" ] | |
do | |
ITERATION=$((ITERATION+1)) | |
FILENAME="$HOME/Desktop/Simulator Recording $ITERATION.$EXTENSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIImage { | |
func image(withRotation radians: CGFloat) -> UIImage { | |
let cgImage = self.cgImage! | |
let LARGEST_SIZE = CGFloat(max(self.size.width, self.size.height)) | |
let context = CGContext.init(data: nil, width:Int(LARGEST_SIZE), height:Int(LARGEST_SIZE), bitsPerComponent: cgImage.bitsPerComponent, bytesPerRow: 0, space: cgImage.colorSpace!, bitmapInfo: cgImage.bitmapInfo.rawValue)! | |
var drawRect = CGRect.zero | |
drawRect.size = self.size | |
let drawOrigin = CGPoint(x: (LARGEST_SIZE - self.size.width) * 0.5,y: (LARGEST_SIZE - self.size.height) * 0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum SizeMatching { | |
case Width, Height, Both, None | |
} | |
class IKScrollView: UIScrollView { | |
//MARK: - Outlets | |
@IBOutlet private var contentView: UIView? | |
//MARK: - Properties | |
@IBInspectable var sizeMatching = SizeMatching.Width |