Commit dc4f39c5 authored by 汪洋's avatar 汪洋

优化OCNavigationBar的 setRightIconURL

parent 0e5b5ae4
...@@ -14,7 +14,7 @@ PODS: ...@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0) - AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- GMBase (0.3.3): - GMBase (0.3.4):
- GMHud - GMHud
- GMKit - GMKit
- GMNetService - GMNetService
...@@ -27,38 +27,38 @@ PODS: ...@@ -27,38 +27,38 @@ PODS:
- TMCache (~> 2.1.0) - TMCache (~> 2.1.0)
- GMHud (0.1.3): - GMHud (0.1.3):
- MBProgressHUD (= 0.9.2) - MBProgressHUD (= 0.9.2)
- GMKit (0.7.41): - GMKit (0.8.5):
- GMKit/Category (= 0.7.41) - GMKit/Category (= 0.8.5)
- GMKit/Color (= 0.7.41) - GMKit/Color (= 0.8.5)
- GMKit/Constant (= 0.7.41) - GMKit/Constant (= 0.8.5)
- GMKit/FDFullscreenPopGesture (= 0.7.41) - GMKit/FDFullscreenPopGesture (= 0.8.5)
- GMKit/Kit (= 0.7.41) - GMKit/Kit (= 0.8.5)
- GMKit/Protocol (= 0.7.41) - GMKit/Protocol (= 0.8.5)
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/Category (0.7.41): - GMKit/Category (0.8.5):
- GMKit/Color (= 0.7.41) - GMKit/Color (= 0.8.5)
- GMKit/Constant (= 0.7.41) - GMKit/Constant (= 0.8.5)
- GMKit/Protocol (= 0.7.41) - GMKit/Protocol (= 0.8.5)
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/Color (0.7.41): - GMKit/Color (0.8.5):
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/Constant (0.7.41): - GMKit/Constant (0.8.5):
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/FDFullscreenPopGesture (0.7.41): - GMKit/FDFullscreenPopGesture (0.8.5):
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/Kit (0.7.41): - GMKit/Kit (0.8.5):
- GMKit/Category (= 0.7.41) - GMKit/Category (= 0.8.5)
- GMKit/Color (= 0.7.41) - GMKit/Color (= 0.8.5)
- GMKit/Constant (= 0.7.41) - GMKit/Constant (= 0.8.5)
- GMKit/Protocol (= 0.7.41) - GMKit/Protocol (= 0.8.5)
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMKit/Protocol (0.7.41): - GMKit/Protocol (0.8.5):
- Masonry (= 1.1.0) - Masonry (= 1.1.0)
- SDWebImage (= 3.7.6) - SDWebImage (= 3.7.6)
- GMNetService (0.1.9): - GMNetService (0.1.9):
...@@ -88,10 +88,10 @@ EXTERNAL SOURCES: ...@@ -88,10 +88,10 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 41ece9b3c244445a1466d4b70ae3603bd21e2f02 GMBase: 804c584ab87f9fc4dfb38c5eb3c608b6a3a00b10
GMCache: fb0af70b420715ef9519487fdd932a357b3cd8d4 GMCache: fb0af70b420715ef9519487fdd932a357b3cd8d4
GMHud: 74387462a8b9f099c760a1ddbf493cc86da7cdbc GMHud: 74387462a8b9f099c760a1ddbf493cc86da7cdbc
GMKit: 4820e0eb7727735f88fb2f983f178edd074343c1 GMKit: 39ca9fdf84f75f4baad186585faef4dbef82f73b
GMNetService: 0109b08ccb149b0c0a7a4601ec17930c7d9a8007 GMNetService: 0109b08ccb149b0c0a7a4601ec17930c7d9a8007
GMPhobos: 1ef7d3b51f66e94a26590ba786ca1173187456e0 GMPhobos: 1ef7d3b51f66e94a26590ba786ca1173187456e0
GMRefresh: 7e176b90fd8d37b0b738c813d71349fd55d86443 GMRefresh: 7e176b90fd8d37b0b738c813d71349fd55d86443
......
...@@ -210,8 +210,7 @@ ...@@ -210,8 +210,7 @@
_nearRightButton.hidden = NO; _nearRightButton.hidden = NO;
[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:_nearRightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { [[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:_nearRightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
if (image) { if (image) {
NSData *imageData = UIImagePNGRepresentation(image); UIImage *scaledImage = [image resizeToDeviceScale];
UIImage *scaledImage = [UIImage imageWithData:imageData scale:[UIScreen mainScreen].scale];
[_nearRightButton setImage:scaledImage forState:UIControlStateNormal]; [_nearRightButton setImage:scaledImage forState:UIControlStateNormal];
} }
}]; }];
...@@ -224,8 +223,7 @@ ...@@ -224,8 +223,7 @@
[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:rightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { [[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:rightIconURL] options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
if (image) { if (image) {
NSData *imageData = UIImagePNGRepresentation(image); UIImage *scaledImage = [image resizeToDeviceScale];
UIImage *scaledImage = [UIImage imageWithData:imageData scale:[UIScreen mainScreen].scale];
[_rightButton setImage:scaledImage forState:UIControlStateNormal]; [_rightButton setImage:scaledImage forState:UIControlStateNormal];
} }
}]; }];
......
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