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
#!/usr/bin/env sh | |
npm list -g appcenter-cli > /dev/null 2>&1 | |
if [[ $? -ne 0 ]] | |
then | |
echo "Installing appcenter-cli..." | |
npm install -g appcenter-cli | |
fi | |
set -e |
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
import UIKit | |
extension UIImage { | |
/** | |
Returns a new UIImage instance by applying the new size. | |
- discussion: http://stackoverflow.com/a/2025413/1926015 | |
- parameter targetSize: the new size | |
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
import UIKit | |
/** | |
A UILabel subclass that will vertically distribute text evenly across any | |
number of lines, preventing text from grouping up at the top. | |
Example: | |
(1) | |
This text: |
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
import UIKit | |
extension UIView { | |
func startSpinning() { | |
let spinAnimation = CABasicAnimation() | |
spinAnimation.fromValue = 0 | |
spinAnimation.toValue = M_PI * 2 | |
spinAnimation.duration = 2.5 | |
spinAnimation.repeatCount = Float.infinity | |
spinAnimation.removedOnCompletion = false |
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
import UIKit | |
public extension CGFloat { | |
/** | |
Converts pixels to points based on the screen scale. For example, if you | |
call CGFloat(1).pixelsToPoints() on an @2x device, this method will return | |
0.5. | |
- parameter pixels: to be converted into points | |
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
// | |
// DispatchAfterWithCancel.h | |
// | |
// Created by Jeff Burt on 4/18/16. | |
// Copyright © 2016 Jeff Burt. All rights reserved. | |
// | |
#ifndef DispatchAfterWithCancel_h | |
#define DispatchAfterWithCancel_h |