Skip to content

Instantly share code, notes, and snippets.

View bryanstrader's full-sized avatar

Bryan Strader bryanstrader

  • Peoria, AZ
View GitHub Profile
@bryanstrader
bryanstrader / keybase.md
Created October 5, 2020 14:43
keybase.md

Keybase proof

I hereby claim:

  • I am bryanstrader on github.
  • I am bstrad (https://keybase.io/bstrad) on keybase.
  • I have a public key ASBISAe8S_wrJbv8bkDgXnLwVb-918C_c153eZ5ugEjXxwo

To claim this, I am signing this object:

@bryanstrader
bryanstrader / CustomButton.swift
Last active July 18, 2017 21:51 — forked from soggybag/CustomButton.swift
Custom Designable, Inspectable button with border and corner radius.
import Foundation
import UIKit
@IBDesignable
class CustomButton: UIButton {
@IBInspectable var borderWidth: CGFloat = 0 {
didSet {
layer.borderWidth = self.borderWidth
@bryanstrader
bryanstrader / UIColorHelper.swift
Created March 4, 2017 20:53
Create UIColor from Hex (Swift 3)
import UIKit
extension UIColor {
convenience init(hex: String, alpha: CGFloat = 1) {
assert(hex[hex.startIndex] == "#", "Expected hex string of format #RRGGBB")
let scanner = Scanner(string: hex)
scanner.scanLocation = 1 // skip #
var rgb: UInt32 = 0