-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBubbleCell.h
58 lines (35 loc) · 1006 Bytes
/
BubbleCell.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// BubbleCell.h
// BubbleMsg
//
// Created by li yajie on 12/18/12.
// Copyright (c) 2012 com.coamee. All rights reserved.
//
#import <UIKit/UIKit.h>
#define kMessageTextSize 14.0f
#define kMessageWidth 200.f
#define kTagBase 200
typedef enum {
kFromMsg = 0,
kToMsg = 1,
} MsgType;
@class BubbleCell;
@protocol BubbleCellDelegate <NSObject>
@optional
-(void) cellItemLongPressed:(NSInteger) index;
@end
@interface BubbleCell : UITableViewCell
{
UIView * messageView;
}
@property(nonatomic,retain) UIImageView * headImageView;
@property(nonatomic,retain) UILabel * nameLbl;
@property(nonatomic,retain) UILabel *postTimeLbl;
@property(nonatomic,retain) UILabel *messageLbl;
@property(nonatomic,retain) UIImageView *bubbleImageView;
@property(nonatomic,assign) MsgType msgType;
@property(nonatomic,unsafe_unretained) id<BubbleCellDelegate> delegate;
+(CGSize)messageSize:(NSString*) originText;
-(CGSize) caculateTextSize:(NSString*) text;
-(CGFloat) textWidth;
@end