NewsBlur/clients/ios/Classes/Utilities.h
David Sinclair 2244830633 iOS: done #1122 (stretched user icon)
Fixed the social feed detail icon being stretched, and the avatar on the feeds list being missing.
2018-09-26 11:20:51 -07:00

26 lines
899 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 *)roundCorneredImage: (UIImage*)orig radius:(CGFloat)r convertToSize:(CGSize)size;
+ (UIImage *)imageWithImage:(UIImage *)image convertToSize:(CGSize)size;
+ (NSString *)md5:(NSString *)string;
+ (NSString *)formatLongDateFromTimestamp:(NSInteger)timestamp;
+ (NSString *)formatShortDateFromTimestamp:(NSInteger)timestamp;
@end