Skip to content

Instantly share code, notes, and snippets.

@jnjosh
jnjosh / TWTHasselhoffImageProtocol.h
Created May 18, 2014 19:43
TWTHasselhoffImageProtocol
//
// TWTHasselhoffImageProtocol.h
// TestURLProtocol
//
// Created by Josh Johnson on 5/9/14.
// Copyright (c) 2014 Two Toasters, LLC. All rights reserved.
//
@import Foundation;
@bobmoff
bobmoff / UIView+ModifyFrame.h
Last active November 27, 2021 06:58
Simple but really useful category on UIView that makes modifying the frame NOT hellish. Published under WTFPL [http://www.wtfpl.net/]. Usage example can be found in the comments
/*
Before:
CGRect frame = myView.frame;
frame.origin.x = newX;
myView.frame = frame;
After:
myView.x = newX;