- Install homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
- Install XMLStarlet for xml parsing:
brew install xmlstarlet
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew install xmlstarlet
// | |
// ImageMerger | |
// | |
// Created by Cardasis, Jonathan (J.) on 4/15/16. | |
// Copyright © 2016 Cardasis, Jonathan (J.). All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> |
let newButtonWidth: CGFloat = 60 | |
UIView.animate(withDuration: 2.0) { | |
self.styledButton.frame = CGRect(x: 0, y: 0, width: newButtonWidth, height: newButtonWidth) | |
self.styledButton.center = self.view.center | |
self.styledButton.layer.cornerRadius = newButtonWidth/2 | |
} |
UIView.animate(withDuration: 1.0) { | |
self.button.frame = CGRect(x: 0, y: 0, width: 100, height: 100) | |
} |
let timingFunction = CAMediaTimingFunction(controlPoints: 0.65, -0.55, 0.27, 1.55) | |
//... | |
CATransaction.setAnimationTimingFunction(timingFunction) | |
//... Do your UIKit animation |
let oldValue = styledButton.frame.width/2 | |
let newButtonWidth: CGFloat = 60 | |
/* Do Animations */ | |
CATransaction.begin() | |
CATransaction.setAnimationDuration(2.0) | |
CATransaction.setAnimationTimingFunction(CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)) | |
// View animations | |
UIView.animate(withDuration: 2.0) { |
CATransaction.begin() | |
CATransaction.setAnimationDuration(0.5) | |
styledButton.layer.opacity = 0.5 | |
styledButton.layer.backgroundColor = UIColor.white.cgColor | |
CATransaction.commit() |
let cornerAnimation = CABasicAnimation(keyPath: #keyPath(CALayer.cornerRadius)) | |
cornerAnimation.fromValue = oldValue | |
cornerAnimation.toValue = newValue | |
cornerAnimation.duration = 1.0 | |
styledButton.layer.cornerRadius = newValue | |
styledButton.layer.add(cornerAnimation, forKey: #keyPath(CALayer.cornerRadius)) |
#!/bin/sh | |
# Sets an icon for a file | |
# Parameters: | |
# $1 icon_source - file path to the icon soruce (a .icns file) | |
# $2 file_path - file path the the destination file to change the icon of | |
icon_source=$1 | |
file_path=$2 | |
generated_icon=".icon.rsrc" |