blob: f3a60cb71191910d134d8970418e8677f6035b6a (
plain)
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
|
//
// ChatMessagesDataSource.m
// NearMe
//
// Created by TW on 9/29/12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#import "ChatMessagesDataSource.h"
@implementation ChatMessagesDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 5;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ChatCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
NSString *cellValue = @"test";
cell.textLabel.text = cellValue;
return cell;
}
@end
|