Skip to content

Instantly share code, notes, and snippets.

//
// .-
// `+d/
// -hmm/
// ommmm/
// `mmmmm/
// `mmmmm/ .:+ssyso+-`
// `mmmmmsydmmmmmmmmmho.
// `mmmmmmh+:---/+ssssyd:
// `mmmmmh. / .md-
@GnuRant
GnuRant / gist:af2dfbd0ec426019efe6
Created December 31, 2014 15:08
Draw 1px border in a UIView
override func drawRect(rect: CGRect) {
var ctx = UIGraphicsGetCurrentContext()
var path = UIBezierPath(rect: rect)
var innerBorder = rect
innerBorder.origin.x += 1.0
innerBorder.origin.y += 1.0
innerBorder.size.width -= 2.0
innerBorder.size.height -= 2.0
@GnuRant
GnuRant / Utility
Last active August 29, 2015 14:12
Remove separators in empty cells
self.tableView.tableFooterView = UIView()
@GnuRant
GnuRant / UIImage.swift
Last active August 29, 2015 14:10
UIImage with color in Swift
//
// UIImage.swift
// ProjectIceCream
//
// Created by Luca D'Incà on 24/11/14.
// Copyright (c) 2014 B3LAB. All rights reserved.
//
import Foundation
import Swift