Skip to content

Instantly share code, notes, and snippets.

View richellis's full-sized avatar

Rich Ellis richellis

  • Nike
  • Portland, Oregon, USA
View GitHub Profile
/// Expands the touch target of the button to be at least as large as the minimum iOS guidelines.
class ExpandedHitButton: UIButton {
let minimumHitSize: CGSize
/// Creates an instance of `ExpandedHitButton`.
///
/// - Parameters:
/// - minimumHitSize: Size of the minimum hit rectangle, centered at the bounds midpoint. Default is 44x44
/// points (iOS Guidelines).
init(minimumHitSize: CGSize = CGSize(width: 44, height: 44)) {
@richellis
richellis / Iconizer.sh
Last active September 15, 2021 22:42 — forked from steverichey/Iconizer.sh
Create iOS application icons from one PDF file. Requires ImageMagick.
#!/bin/sh
#
# Iconizer shell script by Steve Richey ([email protected])
# Modified by Rich Ellis ([email protected]) based on contributions on Github from crishoj, giria
# https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks
#
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject