Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#import <UIKit/UIKit.h>
IB_DESIGNABLE
@interface FlatButton : UIButton
@property (nonatomic, getter=isFilled) IBInspectable BOOL filled;
@property (nonatomic) IBInspectable CGFloat cornerRadius;
@property (nonatomic) IBInspectable CGFloat borderWidth;
@stephsharp
stephsharp / UIImage+Tint.h
Last active August 29, 2017 19:32
UIImage+Tint
//
// UIImage+Tint.h
// Created by Stephanie Sharp on 5/03/2014.
//
#import <UIKit/UIKit.h>
@interface UIImage (Tint)
- (UIImage *)translucentImageWithAlpha:(CGFloat)alpha;
#import <UIKit/UIKit.h>
@interface UIImage (Tint)
- (UIImage *)translucentImageWithAlpha:(CGFloat)alpha;
- (UIImage *)tintedGradientImageWithColor:(UIColor *)tintColor;
- (UIImage *)tintedImageWithColor:(UIColor *)tintColor;
@end
@stephsharp
stephsharp / README.md
Last active October 24, 2022 03:00
Sample code for Stack Overflow question about using a single colour swatch in a Shopify theme (http://stackoverflow.com/questions/18978460/color-swatch-variant-dropdown-list-for-shopify-products)

This is for a Stack Overflow question about using colour swatches in a Shopify theme. It modifies the code provided in this tutorial on the Shopify wiki to only display one swatch that changes color depending on the selected option.

Related links:

@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;
@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 / 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 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 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 / 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;