From 045412a5312546769f452c3b66a2bae9d44105fe Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 16 Oct 2018 21:04:49 +0300 Subject: YYWebImage -> AFNetworking --- Juick/Views/ConversationCell.m | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Juick/Views/ConversationCell.m') diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m index 750ab45..780e74a 100644 --- a/Juick/Views/ConversationCell.m +++ b/Juick/Views/ConversationCell.m @@ -7,7 +7,7 @@ // #import "ConversationCell.h" -@import YYWebImage; +@import AFNetworking; @implementation ConversationCell @@ -20,7 +20,16 @@ self.chatName.text = chat.uname; self.lastMessage.text = @""; self.unreadMarker.text = @""; - [self.avatar yy_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.uid intValue]]] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation]; + __weak UIImageView *weakAvatar; + [self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.uid intValue]]]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + [UIView transitionWithView:weakAvatar + duration:0.3 + options:UIViewAnimationOptionTransitionCrossDissolve + animations:^{ + weakAvatar.image = image; + } + completion:nil]; + } failure:nil]; } @end -- cgit v1.2.3