Skip to content

Instantly share code, notes, and snippets.

@sachithkadamba
sachithkadamba / UIImage+Cache.h
Created November 25, 2012 05:45 — forked from skram/UIImage+Cache.h
UIImage extension, with custom cache control.
//
// UIImage+Cache.m
//
// Created by Mark on 6/6/12.
// Copyright (c) 2012 skram devs LLC. All rights reserved.
// http://skr.am
#import <UIKit/UIKit.h>
@sachithkadamba
sachithkadamba / gist:4142530
Created November 25, 2012 05:44
Custom caching for + (UIImage *)imageNamed:(NSString *)name
//UIImage+Cache.h
#import <UIKit/UIKit.h>
@interface UIImage (Cache)
+ (UIImage *)imageNamed:(NSString *)name;
+ (void)freeCache;
+ (BOOL)freeCacheOnMemoryWarning;
+ (void)setFreeCacheOnMemoryWarning:(BOOL)freeCacheOnMemoryWarning;
// A small variant of Jeff Lamarche code as seen here : http://iphonedevelopment.blogspot.com/2010/05/custom-alert-views.html
//
// CustomAlertView.m
// Custom Alert View
//
// Created by jeff on 5/17/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//