Skip to content

Instantly share code, notes, and snippets.

@stephsharp
stephsharp / iOS5EmbedSegue.h
Created June 14, 2013 01:35
Embed Segue for iOS5
//
// iOS5EmbedSegue.h
// Created by Stephanie Sharp on 2/05/13.
//
#import <UIKit/UIKit.h>
@interface iOS5EmbedSegue : UIStoryboardSegue
@property (nonatomic, strong) UIView * containerView;
@stephsharp
stephsharp / ReadFromPList.m
Last active December 18, 2015 11:58
Snippet to read data from a property list
// Helpful tutorial:
// http://www.theappcodeblog.com/2011/05/30/property-list-tutorial-using-plist-to-store-user-data/
// Get property list from main bundle
NSString * plistPath = [[NSBundle mainBundle] pathForResource:@"PListName" ofType:@"plist"];
// Read property list into memory as an NSData object
NSData * plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
NSString * errorDesc = nil;
NSPropertyListFormat format;
@stephsharp
stephsharp / LoadingView.h
Created July 28, 2013 23:40
Simple iOS loading view
//
// LoadingView.h
// Created by Stephanie Sharp on 26/05/13.
//
// http://www.sitepoint.com/all-purpose-loading-view-for-ios/
// http://www.cocoawithlove.com/2009/04/showing-message-over-iphone-keyboard.html
#import <UIKit/UIKit.h>
@interface LoadingView : UIView
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
@stephsharp
stephsharp / ViewController.h
Last active December 21, 2015 10:09
Insert an object into a property of type NSArray by creating a mutable copy.
@property (nonatomic, retain) NSArray * pins;
@stephsharp
stephsharp / README.md
Last active October 22, 2020 00:36
Stack Overflow user profile Dashing widget

Badge Overflow

An exceptionally handsome way to track your Stack Overflow badges.
Note: Badge Overflow now works with all Stack Exchange sites.

Created by Adam & Stephanie Sharp.

User Profile widget

A Dashing widget that

@stephsharp
stephsharp / README.md
Last active August 19, 2021 14:50
Sample code for Stack Overflow question about using radio buttons for Shopify variants (http://stackoverflow.com/questions/19085276/shopify-variants)
@stephsharp
stephsharp / README.md
Last active December 25, 2015 09:59
Sample code for Stack Overflow question about using colour swatches in a Shopify theme (http://stackoverflow.com/questions/19227823/how-can-i-create-smarter-swatches-for-a-shopify-theme)
@stephsharp
stephsharp / README.md
Last active February 8, 2019 12:23
This code is for a Stack Overflow question about displaying related products in a Shopify theme using product tags.
@stephsharp
stephsharp / EmbedSegue.h
Last active October 28, 2015 10:08
Embed segue for iOS 6 & 7 (using constraints to pin edges of subview to container view)
//
// EmbedSegue.h
// Created by Stephanie Sharp on 20/02/14.
//
#import <UIKit/UIKit.h>
@interface EmbedSegue : UIStoryboardSegue
@property (nonatomic) UIView *containerView;