Skip to content

Instantly share code, notes, and snippets.

@benjaminsnorris
benjaminsnorris / ViewController.m
Created November 14, 2014 18:13
UINavigationController Toolbar
self.navigationController.toolbarHidden = NO;
UIBarButtonItem *editingButton = self.editButtonItem;
UIBarButtonItem *spaceItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil];
[self setToolbarItems:@[editingButton,spaceItem]];
@benjaminsnorris
benjaminsnorris / navAndStatusBarHeight.m
Created October 29, 2014 04:36
Method for height of nav and status bar
- (CGFloat)navAndStatusBarHeight {
return self.navigationController.navigationBar.frame.size.height + [UIApplication sharedApplication].statusBarFrame.size.height;
}
@benjaminsnorris
benjaminsnorris / FetchedResultsControllerDataSource.h
Created October 4, 2014 04:55
FetchedResultsControllerDataSource
//
//
// FetchedResultsControllerDataSource.h
//
// Created by Ben Norris on 10/3/14.
// Copyright (c) 2014 BSN Design. All rights reserved.
//
#import <Foundation/Foundation.h>
@benjaminsnorris
benjaminsnorris / gist:f864e4e522c8c07bb47f
Created September 10, 2014 14:08
GitReferenceDataFunction
func myGitCommands() -> [String: String] {
var commands = [String: String]()
commands["git status"] = ": shows changed files"
commands["git diff"] = ": shows actual changes"
commands["git add"] = ": adds changed files to the commit"
commands["git commit -m\"notes\""] = ": commits the changes"
commands["git push origin _branch_"] = ": pushes commits to branch named _branch_"
commands["git log"] = ": displays progress log"
commands["git comment --amend"] = ": re-enter last commit message"