Skip to content

Instantly share code, notes, and snippets.

View leeprobert's full-sized avatar

Lee Probert leeprobert

View GitHub Profile
@leeprobert
leeprobert / StyleManager.h
Last active December 16, 2015 13:29
A collection of classes and a plist file that can be used to create ios themes with UIAppearance proxy. Note that the styles.plist contains all of the valid CSS color name references. You can use hex values as well as common ios color methods like 'redColor'. Will be adding the ability to also add RGB values as strings. Also note the string shor…
//
// StyleManager.h
// Engager
//
// Created by Lee Probert on 22/04/2013.
//
//
// PLIST FILENAME KEY IN INFO PLIST
#define kStylesFilenameInfoKey @"**.**.*****"
//
// NSColor+Hex.h
// SoundCloud
//
// Created by Robert Böhnke on 4/1/11.
// Copyright 2011 Soundcloud Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@leeprobert
leeprobert / BlockWorker.h
Last active December 16, 2015 04:29
Blocks explorer. Demonstrates Block creation and usage in Objective C. Includes creation of Class methods with blocks as arguments, and creating type definitions for block signatures.
//
// BlockWorker.h
// BlocksExplorer
//
// Created by Lee Probert on 13/04/2013.
// Copyright (c) 2013 Lee Probert. All rights reserved.
//
#import <Foundation/Foundation.h>
@leeprobert
leeprobert / AGNSimpleButton.m
Created March 15, 2013 13:10
Simple UIButton subclass that has a nice embossed grey background drawn on to it. No bitmaps required.
//
// AGNSimpleButton.m
// iP2
//
// Created by Lee Probert on 07/03/2013.
//
//
#import "AGNSimpleButton.h"
@leeprobert
leeprobert / HorizontalDivide.m
Created March 15, 2013 13:08
Simple UIView for drawing an embossed style horizontal line.
//
// HorizontalDivide.m
// iP2
//
// Created by Lee Probert on 25/01/2013.
//
//
#import "HorizontalDivide.h"
@leeprobert
leeprobert / CollectionViewCalendarFlowLayout.m
Created March 15, 2013 12:22
UICollectionViewFlowLayout class that positions the CollectionView Header and Footer views horizontally to the section items. This was used to create a Calendar Week view with one cell per section (representing the day of the week) and the Section header to the left of it and a footer to the right. The other sections were the other days of the w…
//
// CollectionViewCalendarFlowLayout.m
#import "CollectionViewCalendarFlowLayout.h"
#define HEADER_WIDTH 200.0f
#define FOOTER_WIDTH 20.0f
#define SECTION_MARGIN_X 0.0f
#define PADDING_X 0.0f
@leeprobert
leeprobert / CollectionViewOrientingFlowLayout.m
Created March 15, 2013 12:17
UIcollectionViewFlowLayout class for changing the scroll direction based on device orientation.
//
// CollectionViewOrientingFlowLayout.m
// iP2
//
// Created by Lee Probert on 08/03/2013.
//
//
#define ITEM_SIZE 150.0f
#define PADDING 20
@leeprobert
leeprobert / CollectionViewCircleFlowLayout.m
Created March 15, 2013 11:13
UICollectionViewFlowLayout sub-class for layout attributes of all the items in a circle.
//
// CollectionViewCarouselFlowLayout.m
// iP2
//
// Created by Lee Probert on 07/03/2013.
//
//
#import "CollectionViewCircleFlowLayout.h"
@leeprobert
leeprobert / CollectionViewCarouselFlowLayout.m
Created March 15, 2013 11:11
UICollectionViewFlowLayout sub-class that creates layout attributes for items so they render like a carousel. The point of view is from the center of the carousel so is suited for lots of items. It also changes its behaviour based on orientation.
//
// CollectionViewCarouselFlowLayout.m
// iP2
//
// Created by Lee Probert on 07/03/2013.
//
//
#import "CollectionViewCarouselFlowLayout.h"
@leeprobert
leeprobert / input.scss
Created December 3, 2015 11:36
Sass file for my site on leeprobert.cc
@import url('http://weloveiconfonts.com/api/?family=entypo');
/*
VARIABLES
*/
$font-stack: 'Roboto', 'Avenir', Arial, sans-serif;
$grey-color1: #333;
$grey-color2: #444;
$grey-color3: #555;