NewsBlur/clients/ios/Classes/Utilities.h

25 lines
805 B
Objective-C

//
// Utilities.h
// NewsBlur
//
// Created by Samuel Clay on 10/17/11.
// Copyright (c) 2011 NewsBlur. All rights reserved.
//
#import <Foundation/Foundation.h>
void drawLinearGradient(CGContextRef context, CGRect rect, CGColorRef startColor,
CGColorRef endColor);
@interface Utilities : NSObject <NSCacheDelegate> {
NSCache *imageCache;
}
+ (void)drawLinearGradientWithRect:(CGRect)rect startColor:(CGColorRef)startColor endColor:(CGColorRef)endColor;
+ (UIImage *)roundCorneredImage:(UIImage *)orig radius:(CGFloat)r;
+ (UIImage *)imageWithImage:(UIImage *)image convertToSize:(CGSize)size;
+ (NSString *)md5:(NSString *)string;
+ (NSString *)formatLongDateFromTimestamp:(NSInteger)timestamp;
+ (NSString *)formatShortDateFromTimestamp:(NSInteger)timestamp;
@end