mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
405990a7d5
// FREEBIE
57 lines
1.5 KiB
Objective-C
57 lines
1.5 KiB
Objective-C
// Created by Dylan Bourgeois on 29/11/14.
|
|
// Copyright (c) 2014 Hexed Bits. All rights reserved.
|
|
// Portions Copyright (c) 2016 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "OWSDisplayedMessageCollectionViewCell.h"
|
|
#import "UIFont+OWS.h"
|
|
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
|
|
|
const CGFloat OWSDisplayedMessageCellMinimumHeight = 70.0;
|
|
|
|
@interface OWSDisplayedMessageCollectionViewCell ()
|
|
|
|
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *cellTopLabelHeightConstraint;
|
|
@property (weak, nonatomic) IBOutlet UIImageView *headerImageView;
|
|
|
|
@end
|
|
|
|
@implementation OWSDisplayedMessageCollectionViewCell
|
|
|
|
#pragma mark - Class Methods
|
|
|
|
+ (UINib *)nib
|
|
{
|
|
return [UINib nibWithNibName:NSStringFromClass([self class]) bundle:[NSBundle mainBundle]];
|
|
}
|
|
|
|
+ (NSString *)cellReuseIdentifier
|
|
{
|
|
return NSStringFromClass([self class]);
|
|
}
|
|
|
|
#pragma mark - Initializer
|
|
|
|
- (void)awakeFromNib
|
|
{
|
|
[super awakeFromNib];
|
|
|
|
[self setTranslatesAutoresizingMaskIntoConstraints:NO];
|
|
|
|
self.backgroundColor = [UIColor whiteColor];
|
|
|
|
self.messageBubbleContainerView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
|
|
self.messageBubbleContainerView.layer.borderWidth = 0.75f;
|
|
self.messageBubbleContainerView.layer.cornerRadius = 5.0f;
|
|
self.textView.font = [UIFont ows_infoMessageFont];
|
|
self.textView.textColor = [UIColor darkGrayColor];
|
|
}
|
|
|
|
#pragma mark - Collection view cell
|
|
|
|
- (void)prepareForReuse
|
|
{
|
|
[super prepareForReuse];
|
|
self.textView.text = nil;
|
|
}
|
|
|
|
@end
|