mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-24 10:10:02 +08:00
style(ios): some styles changes
This commit is contained in:
@@ -56,12 +56,12 @@ std::string HippyFile::ReadFile(const char* file_path, bool is_auto_fill) {
|
||||
std::streamsize size = file.gcount();
|
||||
file.clear();
|
||||
file.seekg(0, std::ios_base::beg);
|
||||
int data_size = size;
|
||||
long data_size = size;
|
||||
if (is_auto_fill) {
|
||||
data_size += 1;
|
||||
}
|
||||
ret.resize(data_size);
|
||||
int read_size = file.read(&ret[0], size).gcount();
|
||||
long read_size = file.read(&ret[0], size).gcount();
|
||||
if (size != read_size) {
|
||||
HIPPY_LOG(hippy::Warning,
|
||||
"ReadFile file_path = %s, size = %d, read_size = %d", file_path,
|
||||
|
||||
@@ -23,16 +23,22 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIImage.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HippyImageCacheManager : NSObject
|
||||
|
||||
+ (instancetype) sharedInstance;
|
||||
- (void) setImageCacheData:(NSData *)data forURLString:(NSString *)URLString;
|
||||
- (NSData *) imageCacheDataForURLString:(NSString *)URLString;
|
||||
- (void) setImage:(UIImage *)image forURLString:(NSString *)URLString blurRadius:(CGFloat)radius;
|
||||
- (UIImage *) imageForURLString:(NSString *)URLString blurRadius:(CGFloat)radius;
|
||||
|
||||
@end
|
||||
|
||||
@interface HippyImageCacheManager (ImageLoader)
|
||||
|
||||
- (UIImage *)loadImageFromCacheForURLString:(NSString *)URLString radius:(CGFloat)radius isBlurredImage:(BOOL *)isBlurredImage;
|
||||
- (UIImage *)loadImageFromCacheForURLString:(NSString *)URLString radius:(CGFloat)radius isBlurredImage:(nullable BOOL *)isBlurredImage;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user