Skip to content

Instantly share code, notes, and snippets.

View trm36's full-sized avatar

Taylor M trm36

View GitHub Profile
@trm36
trm36 / TriangleView.swift
Last active May 4, 2017 17:26
Update Triangle View Color Dynamically
//Updated for Swift 3.1
class TriangleView : UIView {
var color: UIColor = .black {
didSet {
setNeedsDisplay()
}
}
@trm36
trm36 / Stack.h
Last active August 29, 2015 14:18 — forked from jkhowland/Stack.h
//
// Stack.m
//
// Created by Joshua Howland on 6/12/14.
// Copyright (c) 2014 DevMountain. All rights reserved.
//
#import <Foundation/Foundation.h>
@trm36
trm36 / gist:0c871aa19cef30dc26fc
Created March 7, 2015 14:58
FrontRunner Stations
Pleasant View Station
Ogden Intermodal Center
Roy Station
Clearfield Station
Layton Station
Farmington Station
Woods Cross Station
North Temple Station
Salt Lake Central Station
Murray Central Station
@trm36
trm36 / gist:90b973ef6faeb838f4f6
Created February 24, 2015 19:13
Auto Layout Programmatically
UITextField *textField1 = [UITextField new];
textField1.placeholder = @"UITextField 1";
textField1.borderStyle = UITextBorderStyleRoundedRect;
textField1.backgroundColor = [UIColor redColor];
[textField1 setTranslatesAutoresizingMaskIntoConstraints:NO];
[self.view addSubview:textField1];
UITextField *textField2 = [UITextField new];
textField2.placeholder = @"UITextField 2";
textField2.borderStyle = UITextBorderStyleRoundedRect;