From 782219f3cdc8cac644cc33657813a5f8319dbae7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 4 Mar 2018 10:22:28 +0300 Subject: groups_pms --- Juick/Views/BubbleMessageCell.xib | 74 ++++++++++++++++++++++++++++++++++ Juick/Views/ConversationCell.h | 20 ++++++++++ Juick/Views/ConversationCell.m | 26 ++++++++++++ Juick/Views/ConversationCell.xib | 83 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 Juick/Views/BubbleMessageCell.xib create mode 100644 Juick/Views/ConversationCell.h create mode 100644 Juick/Views/ConversationCell.m create mode 100644 Juick/Views/ConversationCell.xib (limited to 'Juick/Views') diff --git a/Juick/Views/BubbleMessageCell.xib b/Juick/Views/BubbleMessageCell.xib new file mode 100644 index 0000000..a2b6bc3 --- /dev/null +++ b/Juick/Views/BubbleMessageCell.xib @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Juick/Views/ConversationCell.h b/Juick/Views/ConversationCell.h new file mode 100644 index 0000000..f31057b --- /dev/null +++ b/Juick/Views/ConversationCell.h @@ -0,0 +1,20 @@ +// +// ConversationCell.h +// Juick +// +// Created by Vitaly Takmazov on 04/03/2018. +// Copyright © 2018 com.juick. All rights reserved. +// + +#import +#import "Chat.h" + +@interface ConversationCell : UITableViewCell +@property (strong, nonatomic) IBOutlet UILabel *chatName; +@property (strong, nonatomic) IBOutlet UIImageView *avatar; +@property (strong, nonatomic) IBOutlet UILabel *lastMessage; +@property (strong, nonatomic) IBOutlet UILabel *unreadMarker; + +-(void) configureWithChat:(Chat *)chat; + +@end diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m new file mode 100644 index 0000000..750ab45 --- /dev/null +++ b/Juick/Views/ConversationCell.m @@ -0,0 +1,26 @@ +// +// ConversationCell.m +// Juick +// +// Created by Vitaly Takmazov on 04/03/2018. +// Copyright © 2018 com.juick. All rights reserved. +// + +#import "ConversationCell.h" +@import YYWebImage; + +@implementation ConversationCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +-(void) configureWithChat:(Chat *)chat { + 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]; +} + +@end diff --git a/Juick/Views/ConversationCell.xib b/Juick/Views/ConversationCell.xib new file mode 100644 index 0000000..504f7a4 --- /dev/null +++ b/Juick/Views/ConversationCell.xib @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3