|
|
@@ -18,6 +18,7 @@
|
|
|
#import <WXApi.h>
|
|
|
#import <TencentOpenAPI/QQApiInterface.h>
|
|
|
#import <TencentOpenAPI/TencentOAuth.h>
|
|
|
+#import <SDWebImage/SDWebImage.h>
|
|
|
|
|
|
@interface AppDelegate ()<JJExceptionHandle,WXApiDelegate>
|
|
|
{
|
|
|
@@ -127,6 +128,7 @@
|
|
|
[TencentOAuth setIsUserAgreedAuthorization:YES];
|
|
|
TencentOAuth *tencentOAuth =[[TencentOAuth alloc] initWithAppId:QQAPPid andUniversalLink:QQUniversalLink andDelegate:self];
|
|
|
|
|
|
+ [self imageLoadingSettings];
|
|
|
return YES;
|
|
|
}
|
|
|
|
|
|
@@ -328,4 +330,14 @@
|
|
|
}
|
|
|
return nil;
|
|
|
}
|
|
|
+
|
|
|
+- (void)imageLoadingSettings {
|
|
|
+ [SDImageCache sharedImageCache].config.maxDiskAge = 3600 * 24 * 7;
|
|
|
+ [SDImageCache sharedImageCache].config.maxMemoryCount = 1024 * 1024 * 20;
|
|
|
+ [SDImageCache sharedImageCache].config.shouldCacheImagesInMemory = NO;
|
|
|
+ //[SDImageCache sharedImageCache].config.shouldDecompressImages = NO;
|
|
|
+ //[SDWebImageDownloader sharedDownloader].shouldDecompressImages = NO;
|
|
|
+ [SDImageCache sharedImageCache].config.diskCacheReadingOptions = NSDataReadingMappedIfSafe;
|
|
|
+}
|
|
|
+
|
|
|
@end
|