Skip to content

Instantly share code, notes, and snippets.

View neilkimmett's full-sized avatar

Neil Kimmett neilkimmett

View GitHub Profile
"ios": "theo color.yml - setup setup.js - format ios.color.swift > UIColor+Token.swift"
module.exports = theo => {
theo.registerFormat('ios.color.swift', result => {
return `🎉`;
});
}
/* Default page background */
export const colorGray10 = "#f7f7f7";
/* ClassPass' key brand color */
export const colorBrand = "#0055ff";
"scripts": {
"web": "theo colors.yml - transform web - format scss > colors.scss"
}
/* Default page background */
$color-gray10: rgb(247, 247, 247);
/* ClassPass' key brand color */
$color-brand: rgb(0, 85, 255);
global:
type: color
category: color
props:
colorGray10:
value: "#f7f7f7"
comment: Default page background
colorBrand:
value: "#0055ff"
comment: ClassPass' key brand color
{
"dependencies": {
"theo": "salesforce-ux/theo"
}
}
#import <UIKit/UIKit.h>
@interface UIImage (ImageEffects)
- (UIImage *)applyLightEffect;
- (UIImage *)applyExtraLightEffect;
- (UIImage *)applyDarkEffect;
- (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor;
- (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage;
@neilkimmett
neilkimmett / KeyboardManagerViewController.swift
Last active February 18, 2016 10:58
Swift implementation of Soroush Khanlou's keyboard manager view controller
extension UIEdgeInsets {
static var zero: UIEdgeInsets {
return UIEdgeInsetsZero
}
}
// Inspired by "Many Controllers Make Light Work" by Soroush Khanlou
// http://khanlou.com/2016/02/many-controllers/
class KeyboardManagerViewController: UIViewController {
let scrollView: UIScrollView
@neilkimmett
neilkimmett / gist:6535701
Created September 12, 2013 10:51
Using a custom font with Dynamic Text
+ (UIFont *)bodyFont
{
UIFont *dynamicTextFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
UIFont *customFont = [UIFont fontWithName:@"Avenir" size:dynamicTextFont.pointSize];
return customFont;
}