aboutsummaryrefslogtreecommitdiffstats
path: root/Classes/ChatViewController.m
diff options
context:
space:
mode:
authorTeddy Wing2012-09-29 16:21:31 -0400
committerTeddy Wing2012-09-29 16:21:31 -0400
commitaaa15ec5beeb3df296b7b0fa6d693f04fd52170b (patch)
treef15922fef950c3a3d6ae2504512a37ab4628eb81 /Classes/ChatViewController.m
parent033f9053ada0a7f2a9ef7e6652746cd3cbb8f300 (diff)
downloadbabblr-iOS-aaa15ec5beeb3df296b7b0fa6d693f04fd52170b.tar.bz2
Moved tableView datasource to separate class.
Diffstat (limited to 'Classes/ChatViewController.m')
-rw-r--r--Classes/ChatViewController.m19
1 files changed, 2 insertions, 17 deletions
diff --git a/Classes/ChatViewController.m b/Classes/ChatViewController.m
index aee79c8..b0bd903 100644
--- a/Classes/ChatViewController.m
+++ b/Classes/ChatViewController.m
@@ -39,6 +39,8 @@
self.view.backgroundColor = [UIColor colorWithRed:219.0f/255.0f green:226.0f/255.0f blue:237.0f/255.0f alpha:1];
chatTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
+ ChatMessagesDataSource *dataSource = [[ChatMessagesDataSource alloc] init];
+ [chatTableView setDataSource:dataSource];
[self.view addSubview:chatTableView];
containerView = [[UIView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 40, 320, 40)];
@@ -188,23 +190,6 @@
# pragma mark UITableViewDelegate methods
-- (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