Commit c4fb3dd6 authored by aijiaoping's avatar aijiaoping

添加SDWebImage依赖

parent dbce5ee6
......@@ -17,4 +17,5 @@ Pod::Spec.new do |s|
s.dependency 'GMPhobos'
s.dependency 'GMHud'
s.dependency 'GMKit'
s.dependency 'SDWebImage'
end
......@@ -9,6 +9,7 @@
#import <Foundation/Foundation.h>
#import <Masonry/Masonry.h>
@interface GMJailbreak : NSObject
+ (BOOL)isJailbreak;
@end
......
......@@ -10,6 +10,7 @@
#import <Masonry/Masonry.h>
#import "GMBaseUtil.h"
@import GMKit;
@import SDWebImage;
@interface OCNavigationBarButton ()
@property (nonatomic, assign) CGFloat adaptiveWidth;
......@@ -209,7 +210,8 @@
- (void)setNearRightIconURL:(NSString *)nearRightIconURL {
_nearRightIconURL = nearRightIconURL;
_nearRightButton.hidden = NO;
[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:_nearRightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:[NSURL URLWithString:_nearRightIconURL] completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
if (image) {
UIImage *scaledImage = [image resizeToDeviceScale];
[_nearRightButton setImage:scaledImage forState:UIControlStateNormal];
......@@ -221,14 +223,14 @@
- (void)setRightIconURL:(NSString *)rightIconURL {
_rightIconURL = rightIconURL;
_rightButton.hidden = NO;
[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:rightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:[NSURL URLWithString:rightIconURL] completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
if (image) {
UIImage *scaledImage = [image resizeToDeviceScale];
[_rightButton setImage:scaledImage forState:UIControlStateNormal];
}
}];
[self layoutTitle];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment