forked from jaykz52/SocketRocket
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTCChatCell.m
More file actions
39 lines (30 loc) · 971 Bytes
/
TCChatCell.m
File metadata and controls
39 lines (30 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// TCChatCell.m
// SocketRocket
//
// Created by Mike Lewis on 1/28/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "TCChatCell.h"
@implementation TCChatCell
@synthesize nameLabel = _nameLabel;
@synthesize textView = _textView;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}
- (CGSize)sizeThatFits:(CGSize)size;
{
CGSize textViewSize = _textView.bounds.size;
CGSize fitTextViewSize = CGSizeMake(textViewSize.width, size.height);
CGSize sizeThatFitsSize = [self.textView sizeThatFits:fitTextViewSize];
CGSize superSize = [super sizeThatFits:size];
sizeThatFitsSize.height = MAX(superSize.height, sizeThatFitsSize.height);
sizeThatFitsSize.width = superSize.width;
return sizeThatFitsSize;
}
@end