iOS:use image to implement gradient background color

This commit is contained in:
pengfei.zhou
2020-04-09 13:30:31 +08:00
committed by osborn
parent 410c01ba1c
commit ab11ee3372
4 changed files with 70 additions and 48 deletions

View File

@@ -112,7 +112,7 @@ - (UIImage *)currentErrorImage {
- (void)blendView:(UIImageView *)view forPropName:(NSString *)name propValue:(id)prop {
if ([@"imageUrl" isEqualToString:name]) {
__weak typeof(self) _self = self;
BOOL async = NO;
__block BOOL async = NO;
[view yy_setImageWithURL:[NSURL URLWithString:prop] placeholder:[self currentPlaceHolderImage] options:0 completion:^(UIImage *image, NSURL *url, YYWebImageFromType from, YYWebImageStage stage, NSError *error) {
__strong typeof(_self) self = _self;
if (self.placeHolderColor || self.errorColor) {