https://github.com/devjin0617/ios-chattableview-cttableview-sample-sourcecode
iOS Chat TableView Sample
https://github.com/devjin0617/ios-chattableview-cttableview-sample-sourcecode
Last synced: about 1 month ago
JSON representation
iOS Chat TableView Sample
- Host: GitHub
- URL: https://github.com/devjin0617/ios-chattableview-cttableview-sample-sourcecode
- Owner: devjin0617
- License: mit
- Created: 2013-11-03T14:01:14.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-07-25T13:29:16.000Z (almost 10 years ago)
- Last Synced: 2025-01-08T11:21:12.186Z (over 1 year ago)
- Language: Objective-C
- Size: 154 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
iOS-ChatTableView-CTTableView-Sample-SourceCode
===============================================
iOS Chat TableView Sample
This is iMessage Style Source Code of iPhone.

Use
===
1. CTTableView Init
2. CTTableView Set Delegate
```
// CTTableView *chatTableView
chatTableView.delegateCustom = self;
```
3. CTTableView Required Method
```
- (NSArray *)getData
{
CTTableModel *data = [[CTTableModel alloc] init];
data.cUserName = @"devjin0617";
data.cContent = @"Hello World! This is iOS ChatTableView SourceCode";
data.isUserName = YES;
data.cUserImage = [UIImage imagenamed:@"userImg.png"];
NSMutableArray *returnData = [[NSMutableArray alloc] init];
[returnData addObject:data];
return returnData;
}
```
return data is CTTableModel Array
```
@interface CTDataModel : NSObject
@property(nonatomic, copy) NSString *cUserName; // User Name
@property(nonatomic, copy) NSString *cContent; // Chat Text
@property(nonatomic, strong) UIImage *cUserImage; // User Image
@property(nonatomic, assign) BOOL isUserName; // YES : me , NO : friend
@end
```
4. CTTableView Start
```
- (void)viewDidLoad
{
[super viewDidLoad];
chatTableView.delegateCustom = self;
[chatTableView initTableView]; // Chat TableView Start Method.
}
```
LICENSE
=======
LICENSE file.