2011-10-17 09:28:15 -07:00
|
|
|
//
|
|
|
|
// Utilities.h
|
|
|
|
// NewsBlur
|
|
|
|
//
|
|
|
|
// Created by Samuel Clay on 10/17/11.
|
|
|
|
// Copyright (c) 2011 NewsBlur. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2012-07-23 10:57:11 -07:00
|
|
|
void drawLinearGradient(CGContextRef context, CGRect rect, CGColorRef startColor,
|
|
|
|
CGColorRef endColor);
|
|
|
|
|
2011-10-18 08:56:13 -07:00
|
|
|
@interface Utilities : NSObject <NSCacheDelegate> {
|
|
|
|
NSCache *imageCache;
|
|
|
|
}
|
2011-10-17 09:28:15 -07:00
|
|
|
|
2012-07-22 09:12:02 -07:00
|
|
|
+ (void)drawLinearGradientWithRect:(CGRect)rect startColor:(CGColorRef)startColor endColor:(CGColorRef)endColor;
|
2012-07-11 18:08:07 -07:00
|
|
|
+ (UIImage *)roundCorneredImage:(UIImage *)orig radius:(CGFloat)r;
|
2018-09-26 11:20:51 -07:00
|
|
|
+ (UIImage *)roundCorneredImage: (UIImage*)orig radius:(CGFloat)r convertToSize:(CGSize)size;
|
#1693 (2022 Redesign)
- Laboriously updated the icons (finding the names in the web inspector, updating the code, inspecting the colors, setting those separately, dealing with scaling issues, etc etc).
- Let me know if you spot any icons that I missed, or unscaled icons (they have to be explicitly sized, otherwise appear huge).
- More space between story title and story content.
- More space when reading a folder.
- Added Compact/Comfortable to feed detail menu.
- Changing Compact/Comfortable also adjusts the feed detail list.
- Adjusted the color of the story content etc in the feed detail list.
- Removed top and bottom borders from feed title gradient in story detail.
- More space in story detail header.
- The feed detail is offset when selected.
- Updated the feeds social, search, and saved background colors.
- Unread counts no longer have a shadow, and have more space.
- Folders and feeds remain selected in the feeds list when returning from a story or refreshing.
- Folders in the feeds list no longer have a different background color.
- The folders and feeds highlight is now rounded and unbordered like on web.
2022-07-20 21:35:16 -07:00
|
|
|
+ (UIImage *)templateImageNamed:(NSString *)imageName sized:(CGFloat)size;
|
2022-08-17 21:48:20 -07:00
|
|
|
+ (UIImage *)imageNamed:(NSString *)imageName sized:(CGFloat)size;
|
2013-12-06 16:29:15 -08:00
|
|
|
+ (UIImage *)imageWithImage:(UIImage *)image convertToSize:(CGSize)size;
|
2013-06-22 19:34:12 -07:00
|
|
|
+ (NSString *)md5:(NSString *)string;
|
2013-10-10 12:58:40 -07:00
|
|
|
+ (NSString *)formatLongDateFromTimestamp:(NSInteger)timestamp;
|
|
|
|
+ (NSString *)formatShortDateFromTimestamp:(NSInteger)timestamp;
|
2011-10-17 09:28:40 -07:00
|
|
|
|
2011-10-17 09:28:15 -07:00
|
|
|
@end
|
2022-03-29 21:20:41 -07:00
|
|
|
|
|
|
|
@interface UIResponder (FirstResponder)
|
|
|
|
|
|
|
|
+(id)currentFirstResponder;
|
|
|
|
|
|
|
|
@end
|